如何解决Symfony网站上禁止的403
我刚开始一个项目,当我尝试访问该网站时,出现以下错误:如何解决Symfony网站上禁止的403,symfony,permissions,apache2,Symfony,Permissions,Apache2,我刚开始一个项目,当我尝试访问该网站时,出现以下错误: Forbidden You don't have permission to access this resource. 以下是我的网站配置: <VirtualHost *:80> ServerName portfolio.lxc ServerAdmin webmaster@localhost DocumentRoot /var/www/portfolio/publi
Forbidden
You don't have permission to access this resource.
以下是我的网站配置:
<VirtualHost *:80>
ServerName portfolio.lxc
ServerAdmin webmaster@localhost
DocumentRoot /var/www/portfolio/public
<Directory /var/www/portfolio/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
然后是这个错误。当我在互联网上查看时,据说允许“选项跟随符号链接”,但在我的配置中已经允许了。我试过了
chmod -R 777 /var/www/portfolio/
但是我仍然会遇到这个错误。错误日志中有什么内容吗?是否启用selinux?日志中似乎没有任何内容符合错误。什么是selinux?我想我没有用它^^你安装了apache软件包吗
composer需要symfony/apache-pack
()是的,我刚刚做了,同时在我的配置中添加了“Options+FollowSymLinks”,效果很好。我只是不知道是谁帮助解决了这个问题。如果我删除配置中的选项,它仍然可以工作,所以我想添加apache包解决了这个问题!感谢错误日志中的所有内容?是否启用selinux?日志中似乎没有任何内容符合错误。什么是selinux?我想我没有用它^^你安装了apache软件包吗composer需要symfony/apache-pack
()是的,我刚刚做了,同时在我的配置中添加了“Options+FollowSymLinks”,效果很好。我只是不知道是谁帮助解决了这个问题。如果我删除配置中的选项,它仍然可以工作,所以我想添加apache包解决了这个问题!谢谢
chmod -R 777 /var/www/portfolio/