Building A Website - Page 5

Multiple public_html's

    Now you may ask, "Why multiple public_html dirs?" My main reason is for changes and experimentation. If I want to check out my new Flash concept, but preserve my old stuff, I need a way of calling it up locally. When you enter a site the first thing looked for is a public_html dir with an index.html in it. If it doesn't find it and the system is set up to handle PHP, then it will look for an index.php and other variations of the index file that have been allowed for. This is all determined in the apache configuration files... httpd.conf in particular.

    I had all this setup in my SuSE 9.1 version and thought that I had written it up. Well, here I am in my new SuSE 9.2 and I can't find any notes. The update for SuSE 9.2 didn't go well and I had to do a full install. So, I must try to remember what was done and/or investigate the whole mess again.

    I do remember that it involved changes to the httpd.conf file and possibly a .htaccess file. The area of concern in the httpd.conf file is:

# forbid access to the entire filesystem by default
<Directory />
    Options None
    AllowOverride None
    Order deny,allow
    Deny from all

# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all

# List of resources to look for when the client requests a directory
DirectoryIndex index.html index.php index.html.var

    I seem to remember that the changes I need to make involved the "Deny from all". Think I just commented it out... which is what I am going to try first. At present I have curr_public_html, new_public_html and old_public_html in my home dir. The one that I want to use will be symbolically linked to public_html.

    Well, this is interesting. I can access an index.html file in my home/public_html, that uses Flash, but I can not access an index.php... with AND without changes to the http.conf... which is the way I thought that it should be in the first place, except for the PHP part. Of course we are working with a newer system that has had more refinement in the permissions category.

    From what I have read in the Apache docs, this never should have been a problem in the first place.

    So, what we have is: With the httpd.conf un-modified, I can link curr_public_html to public_html and access my home/public_html 'IF' I have an index.html file, but 'NOT' an index.php. 'BUT'... but if I have a real public_html, and not linked, I can access either! How's come only the html index works with both?? Must be another directive somewhere. Rut Ro... I played around with my public_html's whilst I had this open in bluefish and now I can't do a re-save! Ok, save it somewhere else temporarily. Get out of the editor and straighten the mess out. Hmmmmm... something to be aware of in the future Taylor!!

    Anyway, the message I get when I try to show my index.php page is as follows:


You don't have permission to access /~ctaylor/index.php on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.0.50 (Linux/SUSE) Server at dusty-tr.trcomputing Port 80

    Allllrighty now. I wasn't able to get the Y.O.U. during the install of SuSE 9.2 so before going any further I think that an Online Update is in order. There was a problem with PHP in 9.1 which could also be in this version. At any rate we'll make sure that everything is as up-to-date as possible before struggling.

    Nope. Didn't fix it. Back to the config file(s) and the directives. Take a trip to New SuSE 9.2 LAN_link The problem and the fix is explained there. I don't want to duplicate to much info.




Copyright © 2004-2004 All rights reserved.