Welcome Guest, Not a member yet? Register   Sign In
Need help on Nginx SSL
#1

Hi could anyone please take a look at this. I cant restart my nginx

Code:
server {
   listen 80;
   listen [::]:80;
   
#    server_name 192.168.14.253 ;
   server_name caf.psa.gov.ph;

    root  /var/www/html/caf/public;
    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;

        # With php-fpm:
        fastcgi_pass unix:/run/php/php7.3-fpm.sock;
        # With php-cgi:
        # fastcgi_pass 127.0.0.1:9000;
    }

    error_page 404 /index.php;

    # deny access to hidden files such as .htaccess
    location ~ /\. {
        deny all;
    }
}

server {
    listen 443;
    listen [::]:443;
       
    ssl on;
    ssl_certificate /etc/ssl/ChainBundle2.crt;
    ssl_certificate_key /etc/ssl/cpi.psa.gov.key;   

    server_name caf.psa.gov.ph;

    root  /var/www/html/caf/public;
    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;

        # With php-fpm:
        fastcgi_pass unix:/run/php/php7.3-fpm.sock;
        # With php-cgi:
        # fastcgi_pass 127.0.0.1:9000;
    }

    error_page 404 /index.php;

    # deny access to hidden files such as .htaccess
    location ~ /\. {
        deny all;
    }
}
Reply




Theme © iAndrew 2016 - Forum software by © MyBB