LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   another apache question (https://www.linuxquestions.org/questions/linux-software-2/another-apache-question-61785/)

peteABK 05-25-2003 06:55 PM

another apache question
 
I want to appologize for posting yet another apache virtual hosting question. I've been working on this all day long with no luck so any help would be apprecaited.

I've been searching through thread after thread to try to get my virtual hosting working, but after a lot of frustration I was hoping someone could help me out.

For now I have my server listening to all IP addresses dealt to it from the router. I built one page a while ago and configured apache to serve only it, but now I would like to build another and add it in with virtual hosting. I user apache 2 distributed with RH9.

When I add the following

NameVirtualHost *:80

# Virtual host hostedsimply.com
<VirtualHost *:80>
ServerName blahblah.com
ServerAdmin myemail
DocumentRoot /home/username/public_html
</VirtualHost>

Apache just sends the same website as the first site I built. If I change * to the actuall IP address sent from the router, I get the apache default page.

Also with the IP set to * I can access the user director via ~username but with the IP changed I am forbidden. Any help as to what is happening is greatly appreciated.

mcleodnine 05-25-2003 07:36 PM

'NameVirtualHost *' and

<VirtualHost *>
</VirtualHost>

Works for me.

Do you have 'LoadModule vhost_alias_module LibExec/blah,blah' in your conf?

peteABK 05-26-2003 02:00 PM

But if I just leave it like

NameVirtualHost *

<VirtualHost *>
</VirtualHost>

I can only access my site with a secure connection, and I dont have a certificate so there's not much point in doing that.

mcleodnine 05-26-2003 05:23 PM

News to me. Are you using a specific address port 'Listen' directive?

peteABK 05-27-2003 12:39 AM

Yep,

Listen *:80

If I have

NameVirtualHost *

it will only respond to secure requests. I have to have

NameVirtualHost *:80

to respond to normal http://www.blahblah.com

mcleodnine 05-27-2003 01:26 AM

What do the following commands return;

grep Listen /path/to/httpd.conf
grep Port /path/to/httpd.conf

peteABK 05-27-2003 02:26 AM

grep Listen /etc/httpd/conf/httpd.conf returns the Listen directive in my config file:

Listen 192.168.0.100:80

gretp Port /etc/httpd/conf/httpd.con returns:
# When set "Off", Apache will use the Hostname and Port supplied
# Portugese (pt) - Luxembourgeois* (ltz)
# Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)

peteABK 05-27-2003 02:33 AM

Forgot to mention, solved the http versus https problem I was having, but virtual hosting is still causing me grief.

peteABK 05-27-2003 02:58 AM

Stupidity running rampid!!!!!!!!!

I finally screwed my head on straight and I have virtual hosts up and working.


All times are GMT -5. The time now is 11:53 PM.