Find the answer to your Linux question:
Results 1 to 2 of 2
Hello. I wrote this into /etc/httpd/conf/httpd.conf: NameVirtualHost 127.0.0.2 <VirtualHost 127.0.0.2> ServerName karl.arne.net ## ServerPath is needed if not all requests shall go to index ## for default domainname (Or is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2006
    Posts
    2

    VirtualHosts on Fedora Core 5 + 403 Forbidden


    Hello.

    I wrote this into /etc/httpd/conf/httpd.conf:
    NameVirtualHost 127.0.0.2

    <VirtualHost 127.0.0.2>
    ServerName karl.arne.net

    ## ServerPath is needed if not all requests shall go to index
    ## for default domainname (Or is it wrong to do it this way?)

    ServerPath /home/karl/localhost/www
    DocumentRoot /home/karl/localhost/www

    ScriptAlias /cgi/ "/home/karl/localhost/cgi/"

    #
    # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    #
    <Directory "/home/karl/localhost/cgi">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    </Directory>


    </VirtualHost>

    Then I run service httpd configtest and returned: Syntax OK

    So I reloadet it by: service httpd reload

    Permittion on all catalogue in the path to DocumentRoot and the CGI directory are set to 755 (chmod 755 <dirName>)

    Well.. I receive now this error message:

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

    If I use http://localhost I got into the default and that's what I want.
    karl.arne.net (that just is a local test-domain) did not work. It did not work when I use IP instead of the domain name as address.

    By the way. My /etc/hosts looks like this:
    ----------------------------------------------------------------------------------
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 localhost.localdomain localhost
    127.0.0.2 karl.arne.net karl
    -----------------------------------------------------------------------

    Thanks for help.

    K.A.

  2. #2
    Just Joined!
    Join Date
    Sep 2006
    Posts
    2

    WOW ... Fixed!!!

    I got it by myself!

    It was needed to do this:

    #] ls -Z -d localhost/
    #] chcon -R -t httpd_user_content_t localhost/
    #] ls -Z -d localhost/
    #] ls -Z localhost/www

    In this way I got the correct "container" for this "virtualhosts"

    Karl

Posting Permissions

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