aboutsummaryrefslogtreecommitdiff
path: root/srcs/nginx
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-02-22 05:03:12 +0100
committerCharles <sircharlesaze@gmail.com>2020-02-22 05:03:12 +0100
commitf128d6470b18ef8fff4e6ce0b269b2b673ab91ca (patch)
tree56241f649a3f829735ee98811cbe8ffa8238dea0 /srcs/nginx
parentdc44b6fa6c2e52d80e228704888fc2b89a3d0c44 (diff)
downloadft_services-f128d6470b18ef8fff4e6ce0b269b2b673ab91ca.tar.gz
ft_services-f128d6470b18ef8fff4e6ce0b269b2b673ab91ca.tar.bz2
ft_services-f128d6470b18ef8fff4e6ce0b269b2b673ab91ca.zip
mysql base (WIP), nginx config from ft_server
Diffstat (limited to 'srcs/nginx')
-rw-r--r--srcs/nginx/ft_services.com41
1 files changed, 41 insertions, 0 deletions
diff --git a/srcs/nginx/ft_services.com b/srcs/nginx/ft_services.com
new file mode 100644
index 0000000..b04e470
--- /dev/null
+++ b/srcs/nginx/ft_services.com
@@ -0,0 +1,41 @@
+server {
+ listen 443 ssl;
+ listen [::]:443 ssl;
+
+ ssl_certificate /root/ssl/localhost.pem;
+ ssl_certificate_key /root/ssl/localhost-key.pem;
+
+ server_name localhost;
+ index index.php;
+ root /var/www/wordpress;
+
+ location / {
+ try_files $uri $uri/ =404; # if uri or uri/ not valid, 404 error
+ }
+
+ # phpmyadmin path, change root
+ location /phpmyadmin {
+ root /var/www;
+ index index.php;
+ location ~ ^/phpmyadmin/(.+\.php)$ {
+ include snippets/fastcgi-php.conf;
+ fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
+ }
+ location ~ ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
+ root /var/www;
+ }
+ }
+
+ # php files
+ location ~ \.php$ {
+ 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
+ }
+}
+
+server {
+ listen 80;
+ listen [::]:80;
+ server_name localhost;
+ return 301 https://$host$request_uri;
+}