[英]Apache 2.4 directory listing
This is nightmare! 这是噩梦!
I have Ubuntu 16.04.1 LTS with Apache 2.4 我有带有Apache 2.4的Ubuntu 16.04.1 LTS
I have configured pgAdmin4 and now I want to configure Apache to allow download files from location "web" ie: http://xxxx/web/myfile.py and this is giving error 404. I have added sites-available/web.conf, enabled this site (now I can see came on sites-enabled) and my web.conf is: 我已经配置了pgAdmin4,现在我想配置Apache,以允许从位置“ web”下载文件,即: http://xxxx/web/myfile.py ,这给出了错误404。我添加了sites-available / web.conf ,启用了此站点(现在可以看到启用了站点),并且我的web.conf是:
<VirtualHost *:80>
DocumentRoot /var/www
<Directory /var/www>
Options Indexes FollowSymLinks
</Directory>
</VirtualHost>
files is located at /var/www/web/myfile.py 文件位于/var/www/web/myfile.py
pgAdmin4 is configured on http://xxxx/ pgAdmin4在http:// xxxx /上配置
What is wrong? 怎么了?
Check the permissions of your .py file. 检查您的.py文件的权限。 They should be 755. 他们应该是755。
Also add the following in the virtual host directive: 还要在虚拟主机指令中添加以下内容:
<Files *.py>
Require all granted
</Files>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.