LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   apache and virtual host (https://www.linuxquestions.org/questions/linux-networking-3/apache-and-virtual-host-133574/)

diverge 01-11-2004 12:42 AM

apache and virtual host
 
I don't have a domain name for either ip. The main web site on apache thats on the eth0 interface works fine. The problem is with the virtual host. "ps aux" shows 9 httpd daemons are running which sounds correct. However when I do "nmap <addy for eth0:0>" it does not show httpd daemons listening on port 80, but it does show other daemons listening so I know interface eth0:0 is working( also pinged it from another machine, no dropped packets ).

/etc/httpd/conf/httpd.conf

<VirtualHost 64.218.xxx.xxx:80>
ServerAdmin x@sbcglobal.net
DocumentRoot /www
ServerName lilguy.64.218.xxx.xxx:80
ErrorLog /var/log2/error_log
TransferLog /var/log2/access_log common
</VirtualHost>


The ServerName is the same format as the main site. The main site works fine. Firewall is off for troubleshooting.

diverge 01-11-2004 12:45 AM

"apachectl configtest" returned syntax OK

diverge 01-11-2004 02:45 AM

Got it working. Both sites work properly, the main host and virtual host. I added the ip address of the virtual host ( <VirtualHost xxx.xxx.xxx.xxx:80> ) to the Listen Directive of Section 1: Global Environment.

httpd.conf:


Section 1: Global Environment

#Listen: ...
#
#

# ip of the main host
Listen xxx.xxx.xxx.xxx:80
# ip of the virtual host
Listen xxx.xxx.xxx.xxx:80 // I added the virtual address here also.




I've been working on this so long my contacts are stuck to my eyeballs.


All times are GMT -5. The time now is 10:40 PM.