Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

NGINX Just 404 Error it doesn't accept pretty URL -.- #54

Open
jeazyee opened this issue Dec 27, 2016 · 6 comments
Open

NGINX Just 404 Error it doesn't accept pretty URL -.- #54

jeazyee opened this issue Dec 27, 2016 · 6 comments

Comments

@jeazyee
Copy link

jeazyee commented Dec 27, 2016

Hey,
i've setup this on NGINX and it shows front page but if I click on something it will make 404 Error it seems like it doesn't accept pretty urls but I have made it how you told in the description and also restarted nginx after change on config.

Here is my config for the NGINX virtual Host:

`# A I O N (aion.jeazyee.com)
server {
listen 443 ssl;

    server_name aion.jeazyee.com www.aion.jeazyee.com;

    ssl_certificate /etc/letsencrypt/live/aion.jeazyee.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/aion.jeazyee.com/privkey.pem;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/ssl/certs/dhparam.pem;
    ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;
    ssl_stapling on;
    ssl_stapling_verify on;
    add_header Strict-Transport-Security max-age=15768000;

    location ~ /.well-known {
            allow all;
    }



    # The rest of your server block
    root /var/aion/www;
    index index.php index.html index.htm;
    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;

    location / {
            # First attempt to serve request as file, then
            # as directory, then fall back to displaying a 404.
            try_files $uri $uri/ /index.php?$query_string;
            # Uncomment to enable naxsi on this location
            # include /etc/nginx/naxsi.rules

    }

    location ~ .php$ {
            try_files $uri =404;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
   }

}`

My default config for WordPress with pretty URL's is same like above exept this:
` location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$args;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules

    }`

I use php 7 but should't be a problem. Accesable is the page at aion.jeazyee.com/public

Hope you can help me solving!
Greetings Jeazyee

@ghost
Copy link

ghost commented Dec 27, 2016

Replace:
root /var/aion/www
With:
root /var/aion/www/public

This is the right way.

@jeazyee
Copy link
Author

jeazyee commented Dec 27, 2016

@Sipherion Thank You! 👍 Can you please take a look on the page (aion.jeazyee.com) i have debug = true if there are any errors because i use AL 3.9 DB's. If all is right feel free to close this issue :)

@ghost
Copy link

ghost commented Dec 27, 2016

Website will work with any version of Aion (I currently use this website for an AL 2.7 :)) just be carrefull on config files and lang files that contains XP table of players, this table is not the same between 2.X / 3.X and 4.X

@jeazyee
Copy link
Author

jeazyee commented Dec 27, 2016

Okey alright, on admin panel i discovered one error:

/var/aion/www/bootstrap/cache/compiled.php#8913

Symfony\Component\HttpKernel\Exception\NotFoundHttpException if (count($others) > 0) { return $this->getRouteForMethods($request, $others); } throw new NotFoundHttpException(); } protected function checkForAlternateVerbs($request) {

And it's showing me a frustrated animation :D

@ghost
Copy link

ghost commented Dec 27, 2016

Please open new issue and add complete logs you have (logs from Laravel (storage\logs) and from Nginx

@jeazyee
Copy link
Author

jeazyee commented Dec 27, 2016

okey :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant