开发者

apache2 vhost doesn't always respond

I added the following virtualhost (i have the default *:80 one of course) to my apache:

Listen 8989 NameVirtualHost 10.8.0.1:8989

<VirtualHost 10.8.0.1:8989>
    DocumentRoot /var/crib
    ServerName Thor
    ServerAlias Thor

    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/crib/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from 10.8.开发者_JAVA百科0.0/255.255.255.0 ::1/128
    </Directory>
</VirtualHost>

But sometimes it doesn't always respond... so I'm wondering what could be the problem?

I don't even know where to look... 10.8.0.1 is my VPN address. The virtual host 80 works perfectly and am wondering if my configuration has any flaws


Are you planning on having >1 virtual host (diff. hostnames) on that same IP and port? if not, remove the NameVirtualHost option and ServerName and ServerAlias. If you are going to do name based hosting, leave all of that, but use a name that resolves in DNS. You can just put something in /etc/hosts on the local system for testing, but eventually you'll have to get a real hostname for other people to access your site/application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜