Find the answer to your Linux question:
Results 1 to 5 of 5
1st - let me state that I'm new to networking and Apache though I do have an extensive programming background. I am using the following Vhosts.conf file listed below (in ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2002
    Posts
    3

    Editing Vhost and virtual name hosting stops working!


    1st - let me state that I'm new to networking and Apache though I do have an extensive programming background. I am using the following Vhosts.conf file listed below (in the sample conf www.mydomain.us is registered and otherdomain is internal) I've looked at the virtual host docs and I've set this up six ways from Sunday and the snippet below works EXCEPT, it seems that if I make a change (like add a customlog directive) and do a ./apachectl stop and then ./apachectl start and then try to access www.mydomain.us - i get a forbidden don't have access message from apache. if i re-edit and then re-boot it then works fine. Am i shutting down/restarting apache incorrectly? I don't see why just editing the conf causes this to happen. if anyone has any ideas (and it's ok to tell me i'm i've overlooked something simple) I would appreciate. It does not appear from the virtual name docs that it should be this hard. tia - tbullard1

    NameVirtualHost *
    <VirtualHost *>
    ServerName www.mydomain.us
    DocumentRoot /var/www/html/mydomain
    ServerAdmin tbullard1@nc.rr.com
    DirectoryIndex index.html index.html index.htm index.shtml
    ErrorDocument 404 "http://www.mydomain.us/missing.html"
    </VirtualHost>


    <VirtualHost *>
    ServerName otherdomain.com
    DocumentRoot /var/www/html/otherdomain
    ServerAdmin tbullard1@nc.rr.com
    DirectoryIndex index.html index.html index.htm index.shtml
    ErrorDocument 404 "http://otherdomain.com/missing.html"
    </VirtualHost>

  2. #2
    Linux User
    Join Date
    Jul 2002
    Location
    Daytona Beach, FL
    Posts
    487
    Just a thought - try stopping it, then editing the file, and restarting it...

    I seem to recall that some things had to be stopped for the config file to take effect - I woudl think that the start would work fine afterwards - but I have had other binaries that got screwy when the config was modified while they ran - but a reboot usually cured it..

    Anyway - try that until somebody with more of a clue can jump in here
    majorwoo

    Quiet brain, or I\'ll stab you with a Q-tip.

  3. #3
    Just Joined!
    Join Date
    Nov 2002
    Posts
    3

    Editing Vhost and virtual name hosting stops working!

    Thanks a million - i shut down apache "before" i made the config change and then restarted. That seemed to work - I won't make that mistake again - it's the little things that hurt! thanks for the advice.....

  4. #4
    Just Joined!
    Join Date
    Apr 2003
    Posts
    2
    Very strange. I have never heard of that, and have never run into that before.

    I was going to guess that your custom log directory did not exist or something.

    As far as the config file goes, it reads it in at the beginning and should not matter if you are editing it after apache starts. Odd.

  5. #5
    Just Joined!
    Join Date
    May 2003
    Location
    /var/www/
    Posts
    23
    Quote Originally Posted by _hyperion_
    As far as the config file goes, it reads it in at the beginning and should not matter if you are editing it after apache starts. Odd.
    Yes, that's odd. I've never had any problems with editing the config file while Apache was running. I just have to reboot Apache to make the new settings work.

Posting Permissions

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