Created
May 3, 2021 07:43
-
-
Save rolldone/27b485899973940fc4a45796525b224d to your computer and use it in GitHub Desktop.
Wordpress docker nginx fpm with "nginx proxy manager"
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 characters
# nginx config | |
server { | |
listen 80; | |
server_name localhost yourdomain.com; | |
root /var/www/html; | |
index index.php; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
location / { | |
try_files $uri $uri/ /index.php?$args; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass app:9000; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
} | |
} |
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 characters
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_LOG', true ); | |
define('FORCE_SSL_ADMIN ',false); | |
define('force_ssl',false); | |
define('FORCE_SSL_LOGIN', false); | |
define('WP_CACHE',false); | |
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on'; | |
$protocol = 'http://'; | |
if(isset($_SERVER['HTTPS'])) { | |
if ($_SERVER['HTTPS'] == "on") { | |
$protocol = 'https://'; | |
} | |
} | |
define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content' ); | |
define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins' ); | |
define( 'PLUGINDIR', $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins' ); | |
define( 'WP_SITEURL', $protocol . $_SERVER['HTTP_HOST'] . '/'); | |
define( 'WP_HOME', $protocol . $_SERVER['HTTP_HOST'] . '/'); | |
define( 'WP_CONTENT_URL', $protocol . $_SERVER['HTTP_HOST'] . '/wp-content'); | |
define( 'WP_PLUGIN_URL', $protocol . $_SERVER['HTTP_HOST'] . '/wp-content/plugins'); | |
define( 'UPLOADS', 'wp-content/uploads' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment