shahed Posted September 15, 2002 Share Posted September 15, 2002 I just installed a new snapshot, now since i'n not on windows server, my default file for a directory is index.php, how can change for oscommerce?Should I just rename default.php to index.php and make changes to aplication_top.php , after doing that I get an error. Am I doing something wrong? What other way I can make sure customer will browse the site properly. Shahed Link to comment Share on other sites More sharing options...
rjfernandez Posted September 15, 2002 Share Posted September 15, 2002 If you are using the Apache server, then open the httpd.conf, search for a directive like: DirectoryIndex index.php index.php4 index.php3 index.cgi index.html index.htm and add "default.php to the list. So your directive will look like: DirectoryIndex default.php index.php index.php4 index.php3 index.cgi index.html index.htm Hope this helps. Rodrigo Link to comment Share on other sites More sharing options...
shahed Posted September 15, 2002 Author Share Posted September 15, 2002 thanks , it worked out well Link to comment Share on other sites More sharing options...
shahed Posted September 15, 2002 Author Share Posted September 15, 2002 just for reference I am in a shared server so I just put .htaccess... in the /catalog directory DirectoryIndex default.php Link to comment Share on other sites More sharing options...
rjfernandez Posted September 15, 2002 Share Posted September 15, 2002 Yeah, if you are only cgoing to use osCommerce, for instance, in your server then that's is all you need. Rodrigo Link to comment Share on other sites More sharing options...
seCret steVe Posted September 15, 2002 Share Posted September 15, 2002 if that doesnt work then i suggest using my htaccess version: # $Id: .htaccess,v 1.2 Steven Pignataro Exp $ # # This is used with Apache WebServers # # The following makes adjustments to the SSL protocol for Internet # Explorer browsers # # For this to work, you must include the parameter 'Limit' to the # AllowOverride configuration # # Example: # #<Directory "/usr/local/apache/htdocs"> # AllowOverride Limit #</Directory> # # 'All' with also work. (This configuration is in your # apache/conf/httpd.conf file) DirectoryIndex default.php <IfModule mod_setenvif.c> <IfDefine SSL> SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 </IfDefine> </IfModule> this will point it to your default.php file enjoy Link to comment Share on other sites More sharing options...
JerryR Posted September 15, 2002 Share Posted September 15, 2002 This is a pickle. Running apache on a linux box first off. As far as i know apache wil parse the .htaccess files before serving directory. I have read, and re-read, the topics posted on securing the admin directory and yet i still cant seem to get authorization to work... seems like it totally ignores anything i put in the .htaccess file and serves the page anyways. RH7.3 comes with apachectl application to control/configure apache. One setting that resides in the default is 'Let .htaccess files override directory options' i 'enabled' it but still, there is no 'validation' requests sent. im missing something SOMEWHERE... not sure where to look anymore. Link to comment Share on other sites More sharing options...
seCret steVe Posted September 16, 2002 Share Posted September 16, 2002 have you restarted the service when comepleting your changes???? if im understanding you correctly .htaccess files should override if properly configured with in the server it self Link to comment Share on other sites More sharing options...
JerryR Posted September 16, 2002 Share Posted September 16, 2002 yes, i restarted apache when i changed httpd.conf. i do apologize for getting taking the focus off of oscommerce. Upon reading further into the apache docs i believe the directives in my http.conf file needs to be addressed.... got some more reading to do:) Link to comment Share on other sites More sharing options...
chadkeener Posted August 3, 2005 Share Posted August 3, 2005 in your httpd.conf file make sure you have these two lines. AllowOverride AuthConfig AccessFileName .htaccess then set up the .htaccess file in the directory you want to protect, the contents of the file should have these lines in it. AuthName "Login to the Admin Area" AuthType Basic AuthUserFile /path/to/website/catalog/admin/.htpasswd Require user username then run the command htpasswd /path/to/website/catalog/admin/.htpasswd username It will prompt you for the password. After setting it all up, run service httpd configtest to make sure your conf file is good, if it replies OK then reload the service service httpd reload Hope this helps. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.