Wednesday, July 11, 2007

On the road, ESX

1. Create dataset
support_downloads_props.rc is segmented in two parts: section A and section B (B is for specweb running, recommended not to change)
in A
SIMULTANEOUS_SESSIONS=40
base directory number = basenumber + sessions* discaling = 0 + 40 *.25 = 10
the rest are for configuring the directory not to exceed the system limitation

support_image_props.rc only has section A:
SIMULTANEOUS_SESSIONS=40

#./Wafgen support_downloads_props.rc
#./Wafgen support_image_props.rc
DOCROOT is in /var/www, go to /var/www to pick up the dataset and add the scripts in it.

setup->network configuration
XXX.XXX.XXX.13X
255.255.255.0
XXX.XXX.XXX.1

#/etc/init.d/network restart
#service httpd restart

documentroot "/var/www"

------------------------------------------------------
Apache lame
1. 404 Not found
You cannot access / on this server
But display index.php as normal

forgot to change to /var/www

2. 403 Forbidden
You do not have permission to access / on this server
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
In /etc/httpd/logs/error.log, Directory index forbidden by options directive /var/www
/var/www/Error has been moved out of the directory, so it should display the directory list, but nope.

In apache2.2.3 besides httpd.conf configuration file for apache, it also has configuration files in conf.d/ .
1) With error/ directory moved out, directory listing doesn't work.
Go to php.conf,
#Add index.php to the list of files that will be served as directory indexes
DirectoryIndex index.php
this should be commented out
2) Browser the subdirectory of localhost/subdir , the directory can be displayed but localhost/ still doesn't work
It keeps saying "Directory index forbidden by options directive /var/www", checked allowoverride, options +Indexes, problems can never be solved, but move error/ back to /var/www, it works. Page can be displayed.
where does that page come from?
check conf.d/ again, welcome.conf defines the welcome page.
In it, saying "Options -Indexes". Catch it, which has override the /var/www options!

Comments:
Apache access rules definition is a good one. It has the options defining the access patter, it has allowoverride defining the access priority, it has Allow defining the access clients. Maybe it can be applied to security system if the access follows if owning theh access to one directory, then also heritages the subdirectory.
It had worked fine in apache2.2. But apache2.3 gave me pains. In apache2.3, it has scattered many sub configurations around but no hints or instructions for the change. So each new version of Linux, it is a new system which you have to be familiar with again. Also sticking to the old ways may be a good solution, also when using the new style, knowing its working mechanism and its style first before get into using it.

No comments: