【发布时间】:2017-09-13 18:50:15
【问题描述】:
我有一个域名 abcdefgh.com 托管在 Hostgator Cpanel VPS 服务器上。它在 public_html/abcdefgh.com 中有一个文件夹。
以下是部署我的 yii2 网站的图像,但我无法在网站上获得结果。
我之前在共享主机上部署了 Yii2 应用程序,使用复制粘贴文件夹的相同方式,但是在 VPS 服务器中,我很想知道这有什么问题?
1. Hostgator Cpanel VPS 服务器部署
2。输出
3.服务器错误日志
Mon Apr 17 22:48:01.706049 2017] [autoindex:error] [pid 32221] [client 117.208.9.75:49825] AH01276:
Cannot serve directory /home/abc/public_html/abcdefgh.com/: No matching DirectoryIndex
(index.php,index.php5,index.php4,index.php3,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.js,index.jp,index.phtml,index.shtml,index.xhtml,index.html,index.htm,index.wml,Default.html,Default.htm,default.html,default.htm,home.html,home.htm) found, and server-generated directory index forbidden by Options directive
-
.htaccess 文件
Options -Indexes # Rewrite engine RewriteEngine On # condition with escaping special chars RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
【问题讨论】:
-
你的 .htaccess 规则是什么?
-
使用 .htaccess 文件详细信息更新了问题。
-
我正在尝试上传我的
yii2 application,但无法上传。我添加了一个新的question,你可以看看吗?
标签: yii2 cpanel yii2-advanced-app