grrr what did I do wrong??? Apache on linux

blakerwry

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
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
Code:
NameVirtualHost harddrive.howto.dns2go.com
<VirtualHost *>
	ServerName harddrive.howto.dns2go.com
	DocumentRoot /home/harddrive.howto.dns2go.com/public_html
</VirtualHost>

and

Code:
NameVirtualHost harddrive.howto.dns2go.com
<VirtualHost *: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

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
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

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
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
Code:
<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

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
here's what I have in my current Vhosts.conf
Code:
NameVirtualHost *

<VirtualHost *>
   DocumentRoot /home/harddrive.howto.dns2go.com/public_html
   ServerName harddrive.howto.dns2go.com
   ServerAlias [url]www.harddrive.howto.dns2go.com[/url]
   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 [url]www.anime-jennie.com[/url]
   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²

Storage is cool
Joined
Jan 15, 2002
Messages
901
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

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
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

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
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...

Code:
<VirtualHost 192.168.0.167> 
   DocumentRoot /home/harddrive.howto.dns2go.com/public_html 
   ServerName harddrive.howto.dns2go.com 
   ServerAlias [url]www.harddrive.howto.dns2go.com[/url] 
</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.
 
Top