![](/img/trans.png)
[英]How to Configure Passenger with Apache2 + Ruby on Rails on Ubuntu 14.04 LTS
[英]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選項索引FollowSymLinks MultiViews AllowOverride All允許所有訂單,拒絕所有ErrorLog $ {APACHE_LOG_DIR} /error.log CustomLog $ {APACHE_LOG_DIR} /access.log組合在一起我具有以下配置,但我無法直接訪問laravel。 出現以下內容:
任何幫助將不勝感激。 提前致謝。
您必須在/etc/apache2/sites-enabled/laravel.conf文件中將目錄更改為公用路徑。 像這樣:
<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>
您還應該檢查目錄的權限。 大多數文件夾應為普通的“ 755”,文件為“ 644”。 當然,您的供應商文件夾必須可用於安裝任何更新。
請記住,apache用戶是www-data。
這是一個使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.