Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Apache, SSI, and virtual hosts Apps
The Apache web server built in to OS X can support virtual hosts (basically more than one web server on one machine; read all about it on Apache's Virtual Host information page).

Over on this MacNN forum, however, there was a discussion on difficulties getting SSI (server side includes) to work on virtual hosts.

In a nutshell, you need to add a new section to the apache.conf file. Read on to see the exact required steps.

The below solution is courtesy of "InterfaceGuy" (Lucas from InterfaceLift.com) on the MacNN forums; he figured out the required edits. To do this, login as root, and edit the /Library/Web Server/Configuration/apache.conf file and make the following changes:

Add the following statement anywhere you like. However, if you place it just above the 'VirtualHost' area of the file, it might be easier to associate with what it does:
<Directory "/Library/WebServer/InsertDirectoryName">
Options Indexes FollowSymLinks MultiViews ExecCGI +Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Also, there are two other lines that need to be uncommented in the apache.conf file. These are at the bottom of the file. This is required. It is the only way it knows what to do with a .shtml file. Uncomment the lines:
AddType text/html .shtml
AddHandler server-parsed .shtml
You can also uncomment the following line if you want to be able to execute CGIs outside of the cgi-bin directory:
AddHandler cgi-script .cgi
    •    
  • Currently 1.44 / 5
  You rated: 3 / 5 (9 votes cast)
 
[11,201 views]  

Apache, SSI, and virtual hosts | 0 comments | Create New Account
Click here to return to the 'Apache, SSI, and virtual hosts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.