首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >主机Cpanel VPS服务器上的Yii2部署不工作

主机Cpanel VPS服务器上的Yii2部署不工作
EN

Stack Overflow用户
提问于 2017-04-18 04:27:03
回答 1查看 536关注 0票数 0

我有一个域,比如托管在Hostgator Cpanel VPS上的abcdefgh.com。它在public_html/abcdefgh.com.中有一个文件夹

下面是部署我的yii2网站的图片,但我无法在网站上得到结果。

我以前用复制粘贴文件夹的方式在共享主机上部署了Yii2应用程序,但是在VPS服务器中,我很想知道这是怎么回事?

1.主机面板VPS服务器部署

2.输出

3.服务器错误日志

代码语言:javascript
运行
复制
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
  1. .htaccess文件 选项-Indexes #在#条件下重写引擎RewriteEngine,转义特殊字符RewriteCond $1 !^(index.php|robots.txt|favicon.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./index.php/$1,QSA
EN

回答 1

Stack Overflow用户

发布于 2017-04-18 11:44:39

从.htaccess文件中删除它:

代码语言:javascript
运行
复制
Options -Indexes

保存文件,然后重试!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43463570

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档