Apache2 自定义域设置不起作用

Apache2 自定义域设置不起作用

所以我有这个问题,因为不久前在虚拟主机中设置自定义域,它实际上在我的服务器单元上运行,但在我的笔记本电脑上却不行,所以我离线创建了一个自定义域,但是当我尝试访问它时它不会显示它给我This site can't be reached.这是一个常见的错误,当网站无法访问时,但是当我尝试时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

<VirtualHost customsite.app:80>      
        ServerAdmin [email protected]      
        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

相关内容