PDA

View Full Version : grrr what did I do wrong??? Apache on linux



blakerwry
11-08-2002, 05:49 PM
Hey all... I seem to ahve done something to my computer... or apache.. im not really sure...

Apache used to serve Any/All ports and now it only seems to serer 80 and 443 (SSL).... I tried to make a virtual host on port 100 and my computer doesn't seem to be running a server on port 100 anymore...

I have tried removing/reinstalling apache with no success... webmin shows that the default server is operating on Any address and Any port... but like I said.. it only seems to be 80 and 443.


I tried this


NameVirtualHost harddrive.howto.dns2go.com
<VirtualHost *>
ServerName harddrive.howto.dns2go.com
DocumentRoot /home/harddrive.howto.dns2go.com/public_html
</VirtualHost>


and



NameVirtualHost harddrive.howto.dns2go.com
<VirtualHost *&#58;100>
ServerName harddrive.howto.dns2go.com
DocumentRoot /home/harddrive.howto.dns2go.com/public_html
</VirtualHost>


in my Vhosts.conf file... neither one seemed to work... I tried to telnet to port 100 and it could not connect... telnet to port 80 works fine... which makes me think that the server is only working on port 80 now...

Does anyone have any suggestions for me? I have been pulling teeth all day.

blakerwry
11-08-2002, 06:14 PM
well, ok... I won't be dissapointed if I cant get apache to listen on all open ports... it's not really needed....

I can get it to listen on port 80, 100, 433 which is plenty for now....


But, I would appreciate some help setting up virtualhosts.


They will be running on port 100 for now, but I might want to switch them over to port 80 soon.

blakerwry
11-08-2002, 06:21 PM
the server is on my LAN right now, so I really can have as many IP's as I need (i would need to learn howto give my machine multiple IP's 1st)



here's the kind of stuff I've ben trying


<VirtualHost *>
DocumentRoot /home/harddrive.howto.dns2go.com/public_html
ServerName harddrive.howto.dns2go.com
</VirtualHost>



ok, the very 1st question is the asterick... what exactly should be here? the IP of the server? the hostname of the server? the hostname that the user typed into their browser?

document root should be the location where index.html is stored, yes?

server name ... this should be the address that the user typed into their browser, correct?

blakerwry
11-08-2002, 09:37 PM
here's what I have in my current Vhosts.conf


NameVirtualHost *

<VirtualHost *>
DocumentRoot /home/harddrive.howto.dns2go.com/public_html
ServerName harddrive.howto.dns2go.com
ServerAlias www.harddrive.howto.dns2go.com
CustomLog /home/harddrive.howto.dns2go.com/logs/access.log common
ErrorLog /home/harddrive.howto.dns2go.com/logs/error.log
</VirtualHost>


<VirtualHost *>
DocumentRoot /home/anime-jennie.com/public_html
ServerName anime-jennie.com
ServerAlias www.anime-jennie.com
CustomLog /home/anime-jennie.com/logs/access.log common
ErrorLog /home/anime-jennie.com/logs/error.log
</VirtualHost>





Which seems like it should work to give me 2 virtual hosts on 1 IP... one host named anime-jennie.com and one named harddrive.howto.dns2go.com... along with the default server that handles any other requests recieved.


however, I only seem to get whatever is listed first... not both... am I doing something wrong? I have seen this exact layout used in a tutorial done by PHPfreaks.com

NRG = mc˛
11-08-2002, 11:40 PM
Checked httpd.conf?

I have just the most basic clue about Apache, but I do know that the ports it listens on are specified somewhere in there :wink:

blakerwry
11-09-2002, 02:00 AM
Yeah, i have the ports issue straightened out enough for what I need to do. I just want help setting up virtual hosts... I know I wasn't very clear in my first post.

Thx for the advice.

blakerwry
11-09-2002, 10:15 PM
ok, I got it figured out... or atleast .. it works now.


I put basically the same thing i had above into my httpd.conf and it started working correctly...



<VirtualHost 192.168.0.167>
DocumentRoot /home/harddrive.howto.dns2go.com/public_html
ServerName harddrive.howto.dns2go.com
ServerAlias www.harddrive.howto.dns2go.com
</VirtualHost>


<VirtualHost 192.168.0.167>
DocumentRoot /home/anime-jennie.com/public_html
ServerName anime-jennie.com
</VirtualHost>


note that 192.168.0.167 is one of the server's LAN IP addresses.

with this setup anime-jennie.com works... localhost works.... and harddrive.howto.dns2go.com works.... each independently their own site.