Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/19.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
Apache2 apache未访问域virtualhost_Apache2_Ubuntu Server - Fatal编程技术网

Apache2 apache未访问域virtualhost

Apache2 apache未访问域virtualhost,apache2,ubuntu-server,Apache2,Ubuntu Server,所以我有这个问题,因为在virtualhost中设置自定义域时,它实际上在我的服务器单元上工作,但在我的笔记本电脑上不是,因此,我离线创建了一个自定义域,但当我尝试访问它时,它不会显示它给我的无法访问此站点。这是一个常见错误,当无法访问该站点时,但当我尝试127.0.0.1时,它会加载该站点 以下是我在/etc中设置的主机: 0.0.0.0 customsite.app

所以我有这个问题,因为在virtualhost中设置自定义域时,它实际上在我的服务器单元上工作,但在我的笔记本电脑上不是,因此,我离线创建了一个自定义域,但当我尝试访问它时,它不会显示它给我的
无法访问此站点。
这是一个常见错误,当无法访问该站点时,但当我尝试
127.0.0.1
时,它会加载该站点

以下是我在
/etc
中设置的主机:

0.0.0.0         customsite.app                                                                      
0.0.0.0         www.customsite.app                                                                  
127.0.0.1       customsite.app     
127.0.0.1       www.customsite.app    
# 127.0.0.1     localhost         
127.0.1.1       linuxubuntu    
                           
# 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 
我的
虚拟主机

<VirtualHost customsite.app:80>      
        ServerAdmin admin@django.app      
        ServerName customsite.app      
        ServerAlias www.customsite.app                                                              
        DocumentRoot /home/USER/FILES/myworkspace/Apps/python/customsite                          
        <Directory /home/USER/FILES/myworkspace/Apps/python/customsite/system/system>             
                <Files wsgi.py>                                                                        
                        Require all granted                                                            
                </Files>                                                                               
        </Directory>    
        WSGIDaemonProcess customsite.app python-path=/home/USER/FILES/myworkspace/Apps/python/customsite/system python-home=/home/USER/FILES/myworkspace/Apps/python/customsite/    
        WSGIProcessGroup n1swmsadvance.app          
        WSGIScriptAlias / /home/USER/FILES/myworkspace/Apps/python/customsite/system/system/wsgi.py                                                            
</VirtualHost>
sudo a2ensite customesitefile.conf
sudo apachectl restart
sudo service apache2 restart