Find the answer to your Linux question:
Results 1 to 8 of 8
Hi, I have built a test machine in our LAN environment. I am using https-2.2.3-6 on RHEL5 (2.6.18-8.el5). If I run the normal server without virtual hosts I can see ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    49

    appache error: Permission access - on RHEL5


    Hi,

    I have built a test machine in our LAN environment. I am using https-2.2.3-6 on RHEL5 (2.6.18-8.el5). If I run the normal server without virtual hosts I can see the page over the LAN and on that box. But when i introduced a virtual host with the following code in httpd.conf it doesnt work and give me the error on the same box.

    "403 Forbidden
    You don't have permission to access / on this server"

    NameVirtualHost *:80

    <VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /home/http/test
    ServerName test.mycompany.com
    ErrorLog logs/test.mycompany.com-error_log
    CustomLog logs/test.mycompany.com-access_log combined
    </VirtualHost>


    If I check the syntax it shows OK.

    =============

    # httpd -S
    VirtualHost configuration:
    wildcard NameVirtualHosts and _default_ servers:
    *:80 is a NameVirtualHost
    default server test.mycompany.com (/etc/httpd/conf/httpd.conf:1020)
    port 80 namevhost test.mycompany.com (/etc/httpd/conf/httpd.conf:1020)
    Syntax OK

    =============

    Can any body tell me what can be the problem??

    waiting for reply.

    Many thanks.

  2. #2
    Just Joined!
    Join Date
    Mar 2008
    Posts
    46
    Im no expert but it sounds like your, for example index.html page doesnt have read access rights for even root. This has happened to me many times, if you design a page on another computer then transfer it to another it wont allow the page to be even viewed on that computer through your browser. So fix that problem like this (i use ubuntu yes)

    cd /var/www/your directory
    sudo chmod 755 index.html

    Now try again and you should see it no problems in your browser

    http://your directory

    Sorry i dunno the commands for Redhat, ive not used it but im sure you get the idea.
    Hmmm, so is Redhat really as good as I hear?

    Good Luck

  3. #3
    Just Joined!
    Join Date
    Jan 2008
    Posts
    49
    Quote Originally Posted by Tezux View Post
    Im no expert but it sounds like your, for example index.html page doesnt have read access rights for even root. This has happened to me many times, if you design a page on another computer then transfer it to another it wont allow the page to be even viewed on that computer through your browser. So fix that problem like this (i use ubuntu yes)

    cd /var/www/your directory
    sudo chmod 755 index.html

    Now try again and you should see it no problems in your browser

    http://your directory

    Sorry i dunno the commands for Redhat, ive not used it but im sure you get the idea.
    Hmmm, so is Redhat really as good as I hear?

    Good Luck
    Thanks for reply dear. I have already checked the permissions on index file. It was index.php even i changed it into a new file "index.html" with some contents. but I am getting the same error.
    Does this creating any issue as it now test.mycompany.com is now a defult server.

    Can any body help me??

  4. #4
    Just Joined!
    Join Date
    Mar 2008
    Posts
    46
    try changing your Server Name to something thats not a domain name format like just 'test' and change name of directory in your /var/www directory to the same aswell. I havent yet figured out why but this caused issues for me until i changed it a few times.

    Also are you only having these issues over the network or on the localhost machine aswell.??
    You will need to edit your etc/hosts file on every machine on your network to view your Virtual host site over the network.

    Tried that?

  5. #5
    Just Joined!
    Join Date
    Jan 2008
    Posts
    49
    Quote Originally Posted by Tezux View Post
    try changing your Server Name to something thats not a domain name format like just 'test' and change name of directory in your /var/www directory to the same aswell. I havent yet figured out why but this caused issues for me until i changed it a few times.

    Also are you only having these issues over the network or on the localhost machine aswell.??
    You will need to edit your etc/hosts file on every machine on your network to view your Virtual host site over the network.

    Tried that?
    I have moved that test directory from /home/http/test to /var/www/ and its working. but now there is another issue that if i check Open Source and Linux Forums its showing the same page on browser that i created for virtual server.

    Also still not working with index.php

    Any idea?

  6. #6
    Just Joined!
    Join Date
    Mar 2008
    Posts
    46
    "I have moved that test directory from /home/http/test to /var/www/ and its working. but now there is another issue that if i check Open Source and Linux Forums its showing the same page on browser that i created for virtual server."

    Sorry I dont understand what your saying? That link isnt working either



    "Also still not working with index.php"

    Is PHP working at all? Try reinstalling it

  7. #7
    Just Joined!
    Join Date
    Jan 2008
    Posts
    49
    Quote Originally Posted by Tezux View Post
    "I have moved that test directory from /home/http/test to /var/www/ and its working. but now there is another issue that if i check Open Source and Linux Forums its showing the same page on browser that i created for virtual server."

    Sorry I dont understand what your saying? That link isnt working either



    "Also still not working with index.php"

    Is PHP working at all? Try reinstalling it
    Thanks Tezux for quick reply,

    It was automatically change from loalhost to Open Source and Linux Forums when i added http with localhost (Open Source and Linux Forums) you can check the status bar by pointing your mouse to that link. it is http: // localhost (just put space in it )

    php is installed. All I am calling (forwarding) another link in index.php.

    # cat /home/http/test/index.php
    <?
    header("Location: /test/ctrl");
    ?>

    Do you know any otherway to redirect the URL?

  8. #8
    Just Joined!
    Join Date
    Mar 2008
    Posts
    46
    Sorry Im stil not sure what you are asking. Do you want to view it over a network?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •