Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从另一台计算机访问apache上的django站点_Django_Apache - Fatal编程技术网

从另一台计算机访问apache上的django站点

从另一台计算机访问apache上的django站点,django,apache,Django,Apache,我有一个django项目正在apache服务器上运行。我可以访问和使用服务器计算机上的站点 目前,我已将服务器IP设置为192.168.1.6,并打开了端口80 当我尝试从网络上的另一台机器访问站点时,我可以访问文件目录树,而不是站点。我可以看到与网站相关的所有文件(模板和视图等) 为什么会发生这种情况而不是django和apache正常地为网站服务 --编辑-- 这里是我的一些配置设置,顺便说一句,它在ubuntu上运行 htmlfive.wsgi import os import sys s

我有一个django项目正在apache服务器上运行。我可以访问和使用服务器计算机上的站点

目前,我已将服务器IP设置为192.168.1.6,并打开了端口80

当我尝试从网络上的另一台机器访问站点时,我可以访问文件目录树,而不是站点。我可以看到与网站相关的所有文件(模板和视图等)

为什么会发生这种情况而不是django和apache正常地为网站服务

--编辑-- 这里是我的一些配置设置,顺便说一句,它在ubuntu上运行

htmlfive.wsgi

import os
import sys
sys.path = ['/var/www/htmlfive'] + sys.path
os.environ['DJANGO_SETTINGS_MODULE'] = 'htmlfive.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
/etc/主持人 192.168.1.6是我遇到问题的网络

127.0.0.1 localhost
127.0.1.1 ubuntu
192.168.1.6 htmlfive.com 
172.17.107.4 htmlfive.com

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
这里是htmlfive.conf

<VirtualHost *:80>
WSGIScriptAlias / /home/daryl/htmlfive.wsgi
DocumentRoot /var/www/htmlfive/htmlfive/
ServerName htmlfive.com
Alias /static /var/www/htmlfive/static/

<Directory /var/www/htmlfive/>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

WSGIScriptAlias//home/daryl/htmlfive.wsgi
DocumentRoot/var/www/htmlfive/htmlfive/
ServerName htmlfive.com
别名/static/var/www/htmlfive/static/
命令允许,拒绝
通融

粘贴apache日志和配置。这是否属于serverfault?听起来可能是缺少wsgi配置或配置错误?