问题描述
所以我有这个问题,因为以前在virtualhost中设置自定义域,它实际上在我的服务器单元上工作,但是在我的笔记本电脑上却没有,所以我离线创建了一个自定义域,但是当我尝试访问它时,显示它给我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
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)