Turning on ssi's on virtual server

Posted:
in macOS edited January 2014
OK, I'm new to this techie stuff but I'm hoping you can help me!



With the help of our tech guys I've set up a virtual server on my new powerbook. I've got a site in my sites directory and I've configured the virtual server to point to the correct location, 404, directoryindex etc. However, I've been trying to allow ssi's and can't seem to get it working.



I put in the line



Options +Includes



into the VirtualHost config but that doesn't work. I've also looked at the httpd.conf at the level above in case that's overriding it but can't seem to fix it.



I hope someone can help me out with this. Laymans terms if possible please. I'm getting the hang of it but all this server adin is still really new to me.



Thanks for the help

Comments

  • Reply 1 of 4
    etharethar Posts: 111member
    Hmm...on my server, my "Options Includes (etc)" aren't set in the VirtualHost. In your httpd.conf, after the VirtualHost section, there should be some room to place directory-specific permissions. Mine's like this:



    Code:




    <Directory "/var/www/html">

    Options Includes OtherStuff ...



    ...

    </Directory>









    I remember having issues getting SSI's to work too, so see if that fixes it. My server is running RH 8.0, but httpd is pretty much the same no matter what OS you're running
  • Reply 2 of 4
    wiftywifty Posts: 70member
    Hmmm ,ok.



    My virtual server (in /etc/httpd/users/simonw.conf) is:



    --------------

    <Directory "/Users/simonw/Sites/">

    Options Indexes MultiViews

    AllowOverride None

    Order allow,deny

    Allow from all

    </Directory>



    <VirtualHost *>

    ServerAdmin simon@wifty.org

    DocumentRoot /Users/simonw/Sites/leedshockey.albook/www/

    ServerName leedshockey.albook

    ErrorDocument 404 /404.html

    DirectoryIndex welcome.html welcome.shtml index.html index.shtml index.php welcome.php

    Options +Includes

    #ErrorLog /Users/simonw/Sites/leedshockey.albook/logs/leedshockey.albook-error_log

    #CustomLog logs/leedshockey.albook-access_log common

    </VirtualHost>



    -----------







    and in /etc/http/httpd.conf I have the following:



    # Use name-based virtual hosting.

    #

    NameVirtualHost *



    #

    # VirtualHost example:

    # Almost any Apache directive may go into a VirtualHost container.

    # The first VirtualHost section is used for requests without a known

    # server name.

    #

    #<VirtualHost *>

    # ServerAdmin webmaster@dummy-host.example.com

    # DocumentRoot /www/docs/dummy-host.example.com

    # ServerName dummy-host.example.com

    # ErrorLog logs/dummy-host.example.com-error_log

    # CustomLog logs/dummy-host.example.com-access_log common

    #</VirtualHost>



    <Directory "/Users/simonw/Sites">

    Options Includes

    </Directory>



    -----------------



    This sin't woring. Is there anythign obvious in the config that might be the problem?



    Thanks
  • Reply 3 of 4
    thuh freakthuh freak Posts: 2,664member
    Quote:

    Originally posted by Wifty

    This sin't woring. Is there anythign obvious in the config that might be the problem?



    i'm not too strong with my apache config'ing skills, but i'm about 80% sure that apache doesn't re-read its conf files unless you restart it (apache, not the computer). you can do this in the Sharing panel of the System Preferences program. Uncheck web server, then check it on again. That may fix ur problem. If you prefer using terminal you can type 'sudo apachectl restart', and give it ur password when/if asked.
  • Reply 4 of 4
    wiftywifty Posts: 70member
    Yeah you're right. I had been restarting Apache each time I changed it.



    I've sorted it now. In the main httpd.conf the section that allows it to recognise .shtml files was commented out. Now it's working. I guess it was just translating it to a standard .html file, hence the ssi's weren't working.



    Thanks for the help
Sign In or Register to comment.