Last active
July 18, 2025 14:00
-
-
Save chrisjhoughton/8646918 to your computer and use it in GitHub Desktop.
Revisions
-
chrisjhoughton revised this gist
Jan 27, 2014 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ <?php // Add this to the top of your wp-config.php file. // Handle reverse proxy, passing the IP to the server. // This is used by some plugins to fetch the user's IP. if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); $_SERVER['REMOTE_ADDR'] = $ips[0]; } ?> -
chrisjhoughton revised this gist
Jan 27, 2014 . 2 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes. -
chrisjhoughton revised this gist
Jan 27, 2014 . No changes.There are no files selected for viewing
-
chrisjhoughton revised this gist
Jan 27, 2014 . 2 changed files with 14 additions and 34 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,38 +1,17 @@ <VirtualHost *:{PORT}> ServerName www.yourdomain.com ServerAdmin [email protected] DocumentRoot /var/www/yourdir/ <Directory /var/www/yourdir> Options Indexes FollowSymLinks AllowOverride all Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ # Add this file to your /etc/nginx/sites-available directory, renaming it to # the domain of your website. # Change the: server_name, port # Credit to http://mattkirman.com/2011/06/01/how-to-speed-up-wordpress-with-nginx/. server { listen 80; -
chrisjhoughton revised this gist
Jan 27, 2014 . 2 changed files with 43 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ <VirtualHost *:8080> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. ServerName www.yourdomain.com ServerAdmin [email protected] # ServerAlias docs DocumentRoot /var/www/docs/ <Directory /var/www/docs> Options Indexes FollowSymLinks AllowOverride all Order allow,deny allow from all </Directory> # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf </VirtualHost> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,9 @@ # Add this file to your /etc/nginx/sites-available directory, renaming it to # the domain of your website. You'll also need to th change the server_name and port # Credit to http://mattkirman.com/2011/06/01/how-to-speed-up-wordpress-with-nginx/. server { listen 80; server_name www.yourdomain.com; # change this # global gzip on gzip on; @@ -11,7 +14,7 @@ server { add_header Cache-Control public; location / { proxy_pass http://127.0.0.1:{PORT}; # change this proxy_buffering on; proxy_buffers 12 12k; proxy_redirect off; -
chrisjhoughton created this gist
Jan 27, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ server { listen 80; server_name www.yourdomain.com; # global gzip on gzip on; gzip_min_length 10240; gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml; gzip_disable "MSIE [1-6]\."; add_header Cache-Control public; location / { proxy_pass http://127.0.0.1:{PORT}; proxy_buffering on; proxy_buffers 12 12k; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; } }