Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Now, here there are two server blocks, first one is running on port 80.
    for second server block there is a port 443 where you should implement the below code.

    server{
    #ssl configuration
    location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    # try_files $uri $uri/ =404; // comment this block
    try_files $uri $uri/ /index.php$is_args$args;
    }
    }
    Now exit and restart nginx server.

    ~$ sudo service nginx restart

    you are done. enjoy.

    Here is the solution for NGINX only.
    Go to the /etc/nginx/sites-available/
    sudo nano default

    Now, here there are two server blocks, first one is running on port 80.
    for second server block there is a port 443 where you should implement the below code.

    server{
    #ssl configuration
    location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    # try_files $uri $uri/ =404; // comment this block
    try_files $uri $uri/ /index.php$is_args$args;
    }
    }
    Now exit and restart nginx server.

    ~$ sudo service nginx restart

    you are done. enjoy.

Viewing 2 replies - 1 through 2 (of 2 total)