Skip to content

Instantly share code, notes, and snippets.

@si294r
Last active December 9, 2016 07:59
Show Gist options
  • Select an option

  • Save si294r/9f73b617b5cf2d5b7b8c4bec8063a2f6 to your computer and use it in GitHub Desktop.

Select an option

Save si294r/9f73b617b5cf2d5b7b8c4bec8063a2f6 to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
        ServerName almigh.tv
        ServerAlias alegrium2.almigh.tv

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html_almigh_tv

        #LogLevel info ssl:warn
        #LogLevel trace8

        ErrorLog ${APACHE_LOG_DIR}/almigh_tv_error.log
        CustomLog ${APACHE_LOG_DIR}/almigh_tv_access.log combined

        #Include conf-available/serve-cgi-bin.conf

        # Copy from /etc/apache/conf-available/php5.6-fpm.conf
        <IfModule !mod_php5.c>
        <IfModule proxy_fcgi_module>
            # Enable http authorization headers
            <IfModule setenvif_module>
            SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
            </IfModule>

            RewriteEngine On
            RewriteRule ^/(.*)$ /index.php?shorten_id=$1 [PT,QSA]

            ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html_almigh_tv/$1
            #ProxyPassMatch ^/(status|ping)$ fcgi://127.0.0.1:9000/$1
            #ProxyPassMatch ^/(.*)$ fcgi://127.0.0.1:9000/var/www/html_almigh_tv/index.php/$1

            <FilesMatch ".+\.phps$">
                Require all denied
            </FilesMatch>
            # Deny access to files without filename (e.g. '.php')
            <FilesMatch "^\.ph(p[3457]?|t|tml|ps)$">
                Require all denied
            </FilesMatch>
        </IfModule>
        </IfModule>

</VirtualHost>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment