[英]Setting the Root to public folder in laravel @Apache2 Server Ubuntu 14.04 LTS
/etc/apache2/sites-available/laravel.conf : ServerAdmin webmaster@localhost DocumentRoot /var/www/html/laravel/public Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined I have the following configuration and yet i am not able to access laravel directly. /etc/apache2/sites-available/laravel.conf:ServerAdmin webmaster @ localhost DocumentRoot / var / www / html / laravel / public选项索引FollowSymLinks MultiViews AllowOverride All允许所有订单,拒绝所有ErrorLog $ {APACHE_LOG_DIR} /error.log CustomLog $ {APACHE_LOG_DIR} /access.log组合在一起我具有以下配置,但我无法直接访问laravel。 the following appears :
出现以下内容:
Any help would be highly appreciated. 任何帮助将不胜感激。 Thanks in advance.
提前致谢。
You must to change in your /etc/apache2/sites-enabled/laravel.conf file the directory to the public path. 您必须在/etc/apache2/sites-enabled/laravel.conf文件中将目录更改为公用路径。 Like this:
像这样:
<VirtualHost your-ip-address:80>
ServerAdmin admin@amdinserver.es
ServerName localhost
ServerAlias your-url
DocumentRoot /var/www/html/laravel/public
<Directory "/var/www/html/laravel/public">
AllowOverride All
Options FollowSymLinks Indexes
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
You should also check the permissions of the directories. 您还应该检查目录的权限。 Most folders should be normal "755" and files, "644".
大多数文件夹应为普通的“ 755”,文件为“ 644”。 Of course, your vendor folder must be avaible to install any update.
当然,您的供应商文件夹必须可用于安装任何更新。
Remember that the apache user is www-data. 请记住,apache用户是www-data。
This is an example that makes the apache application work on laravel bootstrap cache: 这是一个使apache应用程序在laravel bootstrap缓存上工作的示例:
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.