osCmax v2.5 User Manual
Results 1 to 8 of 8

default.php help

This is a discussion on default.php help within the osCommerce 2.2 Installation Help forums, part of the osCommerce 2.2 Forums category; I have just installed oscommerce and am going thru the security steps. One of the steps says: Next, add 'default.php' ...

      
  1. #1
    New Member
    Join Date
    Dec 2002
    Posts
    19
    Rep Power
    0


    Default default.php help

    I have just installed oscommerce and am going thru the security steps. One of the steps says:
    Next, add 'default.php' to your directory index listing in the httpd.conf file for apache.
    Like most people I go through a hosting service and do not have root access. It says I can set this using .htaccess. Please provide details on how to go about using this method.[/quote]

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    New Member
    Join Date
    Dec 2002
    Posts
    19
    Rep Power
    0


    Default

    Ok so here's my uneducated guess of how to write this file.
    Code:
    AuthName "My Super Secure Directory"
    AuthType Basic
    AuthUserFile /etc/httpd/conf/htpass.conf
    require valid-user
    DirectoryIndex default.php default.html default.htm index.html index.htm index.php
    Is that right? If not could someone post the code. I was aware there is a way to do it, but have no experience writing these files.

    Also not sure what the currect path in that file should be.

  4. #4
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default

    Ok, the path to AuthUserFile can be wherever you want it, usually in your home directory on shared hosting, above your web accessable directories. Looks good, this is what I use:

    Code:
    AuthType Basic
    AuthName "Locked Area"
    AuthUserFile /home/youraccount/.htpasswds/admin/passwd
    require valid-user
    DirectoryIndex default.php default.html default.htm index.html index.htm index.php
    Sometimes your host will have a .htaccess script that you can use right from your control panel. Makes the whole process easy (at least the password protection) You will also need to create the .htpasswds file. This contains encrypted user data.

    You can use this site to auto generate your files:
    http://www.kelv.net/programming/htaccess/

    Makes it really easy!
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  5. #5
    New Member
    Join Date
    Dec 2002
    Posts
    19
    Rep Power
    0


    Default

    But doesn't that make the directory password protected? I'm a bit confused on how to do this where the directory will not require a password or login, but will recognise default.php

  6. #6
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default

    Well, if you dont want password protection, leave all the password code out. Make your .htaccess with only this line:

    DirectoryIndex default.php default.html default.htm index.html index.htm
    You don't need anything else in it.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  7. #7
    New Member
    Join Date
    Dec 2002
    Posts
    19
    Rep Power
    0


    Default

    Thanx. I ended up just changing the filename from default.php to index.php. Seems to work. Please let me know if anyone has had problems from doing that.

  8. #8
    New Member
    Join Date
    Dec 2002
    Posts
    15
    Rep Power
    0


    Default

    I think when I tried changing the file to index.php that some of the links did not work. I ended up changing it back to default.php and calling it by filename from my menu choice (OsCommerce is not the home page on my site.). Maybe earlier version issue or I did not follow it through properly, but I changed back to default.php and moved on.

    Dave

Similar Threads

  1. Default country USA
    By kmazumdar in forum osCMax v1.7 Installation
    Replies: 2
    Last Post: 09-12-2005, 01:38 AM
  2. default everything
    By americamba in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 01-01-2004, 10:19 AM
  3. Images in Default.php?
    By pwog in forum osCommerce 2.2 Modification Help
    Replies: 4
    Last Post: 09-11-2003, 05:48 PM
  4. Default.php or index.php?
    By Dr_Evil in forum osCommerce 2.2 Installation Help
    Replies: 2
    Last Post: 04-17-2003, 04:56 PM
  5. default.php
    By Antonio in forum osCommerce 2.2 Installation Help
    Replies: 1
    Last Post: 01-21-2003, 03:24 PM

Bookmarks

Posting Permissions

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