From 7e0d85db834d6351ed85d01e5126ac31dc510b86 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 8 Jan 2020 19:03:35 +0100 Subject: wordpress working with mysql --- srcs/conf/test.com | 22 ++++++++-------------- srcs/wordpress/wp-config.php | 4 ++-- 2 files changed, 10 insertions(+), 16 deletions(-) (limited to 'srcs') diff --git a/srcs/conf/test.com b/srcs/conf/test.com index 866f8ad..dac8f88 100644 --- a/srcs/conf/test.com +++ b/srcs/conf/test.com @@ -1,27 +1,21 @@ server { - listen 80; # listen all ip on port 80 (0.0.0.0:80) - root /var/www/html; # where to find files for location blocks - server_name test.com; # domain name - index index.php index.html index.htm; # files for empty uri + listen 80; # listen all ip on port 80 (0.0.0.0:80) + root /var/www; # where to find files for location blocks + server_name localhost; # domain name + index index.php index.html; # files for empty uri # all uri location / { - try_files $uri $uri/ =404; # if uri or uri/ no valid, 404 error + try_files $uri $uri/ =404; # if uri or uri/ not valid, 404 error } # php files location ~ \.php$ { - try_files $uri =404; # try file in uri, if not found fallthrough 404 error - - # php fpm proxy - fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; # socket where php fpm is running - fastcgi_index index.php # php fpm default index - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # idk yet - include snippets/fastcgi-php.conf; # include php fpm settings + include snippets/fastcgi-php.conf; # include php fpm settings + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; # socket where php fpm is running } - # configuration files - # deny access and no logs + # configuration files, deny access and no logs location ~ /\. { deny all; access_log off; diff --git a/srcs/wordpress/wp-config.php b/srcs/wordpress/wp-config.php index 66d588c..2f2d89c 100644 --- a/srcs/wordpress/wp-config.php +++ b/srcs/wordpress/wp-config.php @@ -23,10 +23,10 @@ define( 'DB_NAME', 'testdb' ); /** MySQL database username */ -define( 'DB_USER', 'root' ); +define( 'DB_USER', 'wordpressuser' ); /** MySQL database password */ -define( 'DB_PASSWORD', 'root' ); +define( 'DB_PASSWORD', '' ); /** MySQL hostname */ define( 'DB_HOST', 'localhost' ); -- cgit