HTTP Server: Apache 2.4

Virtual host template

by ross at 13:32:52 on August 1, 2014

This virtual host template will work with any PHP running method described earlier without modification.

<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    ServerAdmin [email protected]

    DocumentRoot "/home/example.com/public"

    ErrorLog "/var/log/httpd-example.com-error.log"
    CustomLog "/var/log/httpd-example.com-access.log" combined

    <IfModule fcgid_module>
        FcgidWrapper "/home/example.com/cgi-bin/php.fcgi"
        <IfModule suexec_module>
            SuexecUserGroup myuser mygroup
        </IfModule>
    </IfModule>
</VirtualHost>

<Directory "/home/example.com/public">
    Options FollowSymLinks Indexes
    AllowOverride All
    Require all granted
</Directory>

 

Comments