您没有权限访问/在此服务器上
我在linux mint上,我想为我的symfony 3应用程序配置虚拟主机。您没有权限访问/在此服务器上
这是我在/etc/apache2/sites-available/evaluation.conf虚拟主机:
<VirtualHost *:80>
ServerName evaluation.dev
ServerAlias www.evaluation.dev
DocumentRoot /home/sahnoun/InternshipPFE/Dev/systeme_evaluation/web
<Directory /home/sahnoun/InternshipPFE/Dev/systeme_evaluation/web>
AllowOverride All
Order Deny,Allow
Allow from All
</Directory>
ErrorLog /var/log/apache2/project_error.log
CustomLog /var/log/apache2/project_access.log combined
</VirtualHost>
我已经添加了主机在/ etc/hosts中这样的:
127.0.0.1 evaluation.dev
那不是wrking对我来说,它返回此错误:
故宫
您没有访问此服务器上的权限。 的Apache/2.4.18(Ubuntu的)在evaluation.dev端口服务器8
也许你需要隆重文件的访问权限
chown -R www-data:www-data /home/sahnoun/InternshipPFE/Dev/systeme_evaluation/web
chmod -R 755 /home/sahnoun/InternshipPFE/Dev/systeme_evaluation/web
和
移动从/ etc /的虚拟主机文件apache2/sites-available/evaluation.conf到/etc/apache2/sites-enabled/evaluation.conf
不是也 – sahnoun
工作与更换目录标签这一 ' \t选项指标的FollowSymLinks \t的AllowOverride所有 \t要求所有授予 ' –
请关闭VirtualHost指令。在你的httpd.conf中查看是否启用了虚拟主机 – Hokusai
感谢@Hokusai,是的,它已关闭我忘记了它,我启用了我的虚拟主机,同样的问题! – sahnoun
它应该在/ conf目录中。还请记住将'DirectoryIndex app.php'放入'Directory'指令中。 – Hokusai