の DocumentRoot
はexample.com
にあり/var/www/html
ます。
Laravelがインストールされて/var/www/example/public
おり、アクセスできますが、asなどhttp://example.com/dashboard
の他のルートにアクセスしようとするとエラーが発生します。と言って、誰か私を案内してくれませんか?http://example.com/dashboard/login
404 Not Found
The requested URL /var/www/example/public/index.php was not found on this server.
public ディレクトリの.htaccessファイルはそのままです。
は次の000-default.conf
とおりです。
ServerName example.com
UseCanonicalName Off
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /dashboard /var/www/example/public
<Directory /var/www/example/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
#dynamic subdomain provisioning
<VirtualHost *:80>
DocumentRoot /var/www/example/public
ServerName user.example.com
ServerAlias *.example.com
<Directory /var/www/example/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>