Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1

    Default virtualhosts and webpassword

    Hi All

    I'm trying to enable webpassword for a virtualhost via sitemanager, but I get the message "The directory does not exist. Please enter a valid url...."

    This is the scenario:

    • my main domain is abc.com.

      I have a virtualhost (def.com)

      def.com's root is defined in a sub-folder of abc.com - lets call it 'def'

      Within this folder I have a folder called 'admin' which I want to protect.

      So my path to the folder I want to protect is '/www/htdocs/def/admin'

      I can browse to this folder (http://def.com/admin) no problem so this is not a question of a spelling error.

      In site manager I start to create a new webpassword entry - I enter the url 'http://def.com/admin' and fill in the rest of the fields and when I press enter I get the above error message.

      If I enter http://abc.com/def/admin and the url the password is created - but only works when I browse to the url http://abc.com/def/admin - not when I browse to http://def.com/admin.


    Does anybody have a solution to this?

    P.S Site manager sucks for managing virtual hosts - does anyone know of another application that i could install that might make my life a little less painful?[/list]
    <--R O B-->

  2. #2

    Default

    ok figured it out !

    I'n your httpd.conf file you MUST define your document root as :

    /var/www/html/your_vhosts_root_folder

    and NOT as:

    /www/htdocs/

    which is what I had been doing previously
    <--R O B-->

  3. #3

    Default httpd.conf

    Where is this "httpd.conf" file that you are talking about?

    I am having a hard time using .htaccess file in my sub domain names. I called the Tech Support and was told that it is not possible to do it.

    Seems like you did it, can you please provide a step-by-step instruction on how to modify the files so my .htaccess and .htpasswd file will work?

    Thanks.

  4. #4
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    httpd.conf is located in /ect/httpd/conf/
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  5. #5

    Default

    Now that I found it, do I just simply change /www/htdocs to /var/www/html/myvirtualdomainfolder? Will this affect anything with my primary domain?

  6. #6
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    I can't say for sure. I know Rob still visit the forum but this is a pretty old thread so not sure if he is still checking it or not. I would think that there would be a virtual host set up for your virtual domain and that if you just changed that on it shouldn't effect your primary domain. If you do anything make sure to make a backup of the original file in case some goes wrong. Also after makeing changes to the httpd.conf file you have to restart apache and that can be done in your Site Manager. It can also be done in an SSH session if you are comfortable with that. Wish I could be more help. If Rob does not reply in a day or so you might try PM'ing him.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  7. #7

    Default

    Good News!

    After much frustration with the .htaccess file and tech support with WestHost, I decided to just go to sleep and forget about it. However, the next morning when I woke up, all the sudden the password works! Looks like to me WestHost was doing something in the middle of the night fixing my problem. Anyhow, this is all I did:

    1. create a regular .htaccess file (can be found on many web sites, search Google for ".htacesss")
    2. create a .htpasswd file, which also can be found on Google
    3. upload the .htaccess file into the directory you want to protect (using ASCII, not Binary!)
    4. upload the .htpasswd file the same way but to a directory that is above your /www/yourvirtualdomain folder
    5. you should be good to go!

  8. #8
    WestHost - TMonsen
    Guest

    Default how the .htaccess file was fixed

    Rchub,

    You are right, we did continue to work on this for you. The reason that your .htaccess file was not working for your domain alias', was that the alias was not allowing the rewrite rules. I added the following to your
    virtual host directives.

    <Directory />
    AllowOverride All
    </Directory>

  9. #9

    Default

    Where did you add that? in the httpd.conf file?

  10. #10
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Yes rchub that would have been added to the httpd.conf If you take a look at it I would imagin you'll see it. It should be at the bottom of the file and I think that would have been inserted in between something that looks like this:

    <VirtualHost *>
    ServerName virtualhost.yourdomain.com
    ServerAlias www.virtualhost.yourdomain.com
    DocumentRoot /path/to/virtualhost/dirctory
    </VirtualHost>
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

Posting Permissions

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