Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    VirtualHosts on Fedora Core 5 + 403 Forbidden


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


    ## 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


    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. (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. localhost.localdomain localhost karl

    Thanks for help.


  2. #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"


Posting Permissions

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