Odd problem here. I've successfully setup virtual hosts on my computer and I
can access them from everyone elses computer, but I
can't access them from the local computer.
So sandwich.domain.edu is the default to go to. It is set as the global DocumentRoot and ServerName.
I can access it by typing its address in the browser on the local computer.
On the other hand, mentoring.domain.edu doesn't load at all and times out. On other computers, it loads fine. Any suggestions? Even better, is there a way I can trace what is happening when the request for mentoring.domain.edu is sent from my computer and how apache or whatever catches that request and interprets it?
Some more thoughts about it:
I was thinking the firewall might be a problem, since i manually did iptables myself with very basic rules, and perhaps virtual hosting gets confused that the localhost is trying to access it:
Code:
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -s 127.0.0.0/8 -d 127.0.0.0/8 -i lo -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
# apache
iptables -A INPUT -p tcp --dport 80 -i eth0 -j ACCEPT
Here is also my virtual host settings. As I said, they work when accessed from any computer that is not the local computer hosting the server.
Code:
<VirtualHost *:80>
DocumentRoot /websites/sandwich/WWW
ServerName sandwich.domain.edu
ErrorLog /websites/sandwich/logs/error_log
CustomLog /websites/sandwich/logs/access_log common
</VirtualHost>
<VirtualHost *:80>
ServerName mentoring.domain.edu
ServerAlias mentoring
DocumentRoot /websites/mentoring/WWW
ErrorLog /websites/mentoring/logs/error_log
CustomLog /home/share/websites/svsa/mentoring/logs/access_log common
</VirtualHost>