LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-31-2003, 03:56 PM   #1
gdboling
LQ Newbie
 
Registered: Aug 2003
Posts: 18

Rep: Reputation: 0
[semi-resolved]Apache Problems


I have searched this site as well as google and tried everything that was suggested and I am still having problems, so I thought I would post a question.

I have running RH 9 with Apache installed. I am trying to add a virtual host. I am doing this all on an internal network, so my IP address for the server is 192.168.1.102. I tried editing the httpd.conf file manually, then tried WEBMIN and I am getting the same results. I have been through Apache's docs as well but to no avail.

Here is my virutal host directive

<VirtualHost 192.168.1.102>
DocumentRoot /home/gdboling/www/html
ServerName embedded.no-ip.com
</VirtualHost>

And so no when I try and access the web page, I get the classic FORBIDDEN You don't have permissions to access '/' .......

So I am at a loss. I have chmod my folders and index.html file to 755. I have also tried 777, but that does not work etiher. If anyone has anymore pointers for me I would really appreciate it.

Thanks.

Last edited by gdboling; 09-01-2003 at 02:05 PM.
 
Old 08-31-2003, 04:43 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Try specifying the VirtualHost with:

<VirtualHost *>
DocumentRoot /home/gdboling/www/html
ServerName embedded.no-ip.com
</VirtualHost>

And be sure to restart apache after making the changes. Also, you do have:

#
# Use name-based virtual hosting.
#
NameVirtualHost *

In your config file uncommented out as well right?
 
Old 08-31-2003, 04:52 PM   #3
gdboling
LQ Newbie
 
Registered: Aug 2003
Posts: 18

Original Poster
Rep: Reputation: 0
I tried that and now I get a

Bad Request
Your browser sent a request this server could not understand


And I made sure I have NameVirtualServer uncommented. And originally I had specified 192.168.1.102 but changed it to * for this test which give me the above error. If I change everything back to IP I get the Forbidden Message.

Thanks fot the quick reply though.
 
Old 08-31-2003, 07:04 PM   #4
KSammut
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Rep: Reputation: 0
add virtualmin to webmin.. It make life a lot easier for us noobs
 
Old 08-31-2003, 07:46 PM   #5
gdboling
LQ Newbie
 
Registered: Aug 2003
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by KSammut
add virtualmin to webmin.. It make life a lot easier for us noobs
Thanks for the suggestion. I will look into it. However, I don't believe that will solve my problem. And if it does, I would like to know what it did that solved it.

I don't believe I am doing anything wrong. I think most documentation and tutorials are somewhat incomplete and when they talk about adding directives, they don't say "First, you need to make sure...." and they don't talk about other things that will affect what you are working on. For example the .htaccess file, the Directory Directives (which webmin doesn't even add for you automatically, but appreantly they are needed to make things work right). I guess I am just going to have to break down and buy a book.

If anyone else has any other suggestions, please let me know.

Thanks.
 
Old 08-31-2003, 10:04 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
What version of apache are you using? 2.0 is way different than 1.3 was....

Have you checked either online documents on www.apache.org ?
 
Old 08-31-2003, 10:11 PM   #7
gdboling
LQ Newbie
 
Registered: Aug 2003
Posts: 18

Original Poster
Rep: Reputation: 0
I am running 2.0 and yes, I have been through the documentation. I have done what they stated to do in order to get a Virtual Host running (which isn't much according to the docs), and I am getting that error message.
 
Old 09-01-2003, 08:13 AM   #8
gdboling
LQ Newbie
 
Registered: Aug 2003
Posts: 18

Original Poster
Rep: Reputation: 0
After reading through another post on this site, I think it might be possible that the default Apache install that ships with RH does not have Virtual Hosting module compiled in. I ran a command

httpd -L | grep Virtual

and got nothing. So, I am off to compile and install Apache from scratch and see if I can get this thing working. I will let everyone know if this is the problem or not.

Thanks for the help so far.
 
Old 09-01-2003, 01:42 PM   #9
gdboling
LQ Newbie
 
Registered: Aug 2003
Posts: 18

Original Poster
Rep: Reputation: 0
Ok, here is what I have done. And I am not sure why it is working and the other way was not.

I went ahead and unistalled the default Apache that ships with RH9. I downloaded and installed Apache and made sure everything was running as default.

Next, I added a VirtualHost for the default Host

<VirtualHost 192.168.1.102>
DocumentRoot /usr/local/apache/htdocs
ServerName www.mydomain.com
</VirtualHost>

Then I restarted Apache to check that, and everything still worked.

Next, I added my other Domain

<VirtualDomain 192.168.1.102>
DocumentRoot /usr/local/apache/htdocs/Domain2
ServerName www.Domain2.com
</VirtualServer>

And restarted Apache and everything still worked, including the new Domain.

Now, if I change my DocumentRoot on the Domain2, I still get the Forbidden error. So it must have something to do with my permissions on the folders.

I have tried changing them to 755, 777 and still get that Forbidden error

I have added the Directory directive for the folder, and I still get the Forbidden error message.

So if anyone has some suggestions for me beyond this point, I would love to hear them.

Thanks.
 
Old 09-01-2003, 01:49 PM   #10
gdboling
LQ Newbie
 
Registered: Aug 2003
Posts: 18

Original Poster
Rep: Reputation: 0
Strange

I made a new directory as root at /www/domain2

adjusted my VirtualHost and it seems to work. So I guess I will just stick with this scheme.
 
  


Reply



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
apache problems root3d Linux - Software 5 03-08-2004 04:26 PM
Apache problems BrettPower Linux - Networking 3 03-06-2004 10:52 PM
Apache problems rooster13 Linux - Networking 6 07-16-2003 11:41 PM
Apache virtualhost problems, apache install problems nyroc Linux - Software 2 06-09-2003 11:16 PM
Apache problems RecoilUK Linux - Networking 6 07-13-2001 06:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:52 AM.

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
Open Source Consulting | Domain Registration