C
Installed Una on Ubuntu and Nginx and I get the 404 error, file not found, on all pages except the homepage. Any help would be appreciated as I'm stuck on this.
Sounds like rewrite is missing. It's supereasy, go to...
/etc/nginx/sites-available/yourdomain.conf
There are two options, depending your setup....
Add this...
# UNA Rewrite location / { index index.html index.htm index.php; rewrite "^/page/(.*)$" /page.php?i=$1 last; rewrite "^/m/(.*)$" /modules/index.php?r=$1 last; rewrite "^/s/([a-zA-Z0-9_]+)/([a-zA-Z0-9\.]+)" /storage.php?o=$1&f=$2 last; }
If ... yourdomain.com/una/, or something like that then you need this... (if not una, you can rename to match yours)
# UNA Rewrite location /una/ { index index.html index.htm index.php; rewrite "^/una/page/(.*)$" /una/page.php?i=$1 last; rewrite "^/una/m/(.*)$" /una/modules/index.php?r=$1 last; rewrite "^/una/s/([a-zA-Z0-9_]+)/([a-zA-Z0-9\.]+)" /una/storage.php?o=$1&f=$2 last; }
Then restart nginx and you're good to go!
Thank you!
It worked but now the home page gets me the 404 error. I guess I have to edit a bit more my nginx config.
Sounds like rewrite is missing. It's supereasy, go to...
/etc/nginx/sites-available/yourdomain.conf
There are two options, depending your setup....
Add this...
# UNA Rewrite
location / {
index index.html index.htm index.php;
rewrite "^/page/(.*)$" /page.php?i=$1 last;
rewrite "^/m/(.*)$" /modules/index.php?r=$1 last;
rewrite "^/s/([a-zA-Z0-9_]+)/([a-zA-Z0-9\.]+)" /storage.php?o=$1&f=$2 last;
}
If ... yourdomain.com/una/, or something like that then you need this... (if not una, you can rename to match yours)
# UNA Rewrite
location /una/ {
index index.html index.htm index.php;
rewrite "^/una/page/(.*)$" /una/page.php?i=$1 last;
rewrite "^/una/m/(.*)$" /una/modules/index.php?r=$1 last;
rewrite "^/una/s/([a-zA-Z0-9_]+)/([a-zA-Z0-9\.]+)" /una/storage.php?o=$1&f=$2 last;
}
Then restart nginx and you're good to go!
C
Thank you!
It worked but now the home page gets me the 404 error. I guess I have to edit a bit more my nginx config.