LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-25-2003, 07:55 PM   #1
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Rep: Reputation: 15
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.
 
Old 05-25-2003, 08:36 PM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
'NameVirtualHost *' and

<VirtualHost *>
</VirtualHost>

Works for me.

Do you have 'LoadModule vhost_alias_module LibExec/blah,blah' in your conf?
 
Old 05-26-2003, 03:00 PM   #3
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Original Poster
Rep: Reputation: 15
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.
 
Old 05-26-2003, 06:23 PM   #4
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
News to me. Are you using a specific address port 'Listen' directive?
 
Old 05-27-2003, 01:39 AM   #5
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Original Poster
Rep: Reputation: 15
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
 
Old 05-27-2003, 02:26 AM   #6
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
What do the following commands return;

grep Listen /path/to/httpd.conf
grep Port /path/to/httpd.conf
 
Old 05-27-2003, 03:26 AM   #7
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Original Poster
Rep: Reputation: 15
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)
 
Old 05-27-2003, 03:33 AM   #8
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Original Poster
Rep: Reputation: 15
Forgot to mention, solved the http versus https problem I was having, but virtual hosting is still causing me grief.
 
Old 05-27-2003, 03:58 AM   #9
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Original Poster
Rep: Reputation: 15
Stupidity running rampid!!!!!!!!!

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question - (apache?) pylon42 Linux - General 7 03-23-2005 08:55 AM
Apache Question Sideshow Linux - Networking 6 02-13-2004 06:31 PM
another apache question needforspeed Linux - Software 2 09-26-2003 10:24 PM
Apache question plisken Linux - Software 1 02-25-2003 03:40 PM
apache question davsingl67 Linux - Newbie 1 12-11-2002 03:04 PM


All times are GMT -5. The time now is 12:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration