Nginx - failed config - only main page shows - others 404 mod rewrite disabled by DA

tomek1979

Verified User
Joined
Apr 18, 2017
Messages
19
Hi. I installed DA in Debian 8, I chose Nginx as a server, but only home pages of any site added (via Installatron) works.
Looks like mod rewrite is disabled with Direct Admin install script for Nginx.

How to fix it?

Thanks
Tomek
 
Hello Tomek,

NGINX does not support apache's mod_rewrite and does not support .htaccess at all.

If you need mod_rewrite then you should use nginx+apache or transform manually all rewrite rules into NGINX native format.
 
Hi. I know nginx is not using htaaccess and mod rewrite. I just suspected something similar in Nginx (rewrites) - that is not working with default DA install script. So how to fix it?
I installed DA twice on clean Debian 8 server. No other garbages. Later I did only maria db upgrade with custombuilds.
But each site added to DA - has only main page working while other links/categories in Wordpress or admin area, the same for Magento gives 404
So some rewrites in Nginx are disabled or similar thing?
any help? install script is buggy for nginx....
 
What kind of install script did you use?

Directadmin offers Custombuild as the only official way to install software managed by Directadmin.

As of now Directadmin does not have templates for NGINX for Wordpress and others. So you have default config which you should configure per you needs so that SEO-URLs to start working... or you want to say that wp-admin/ and wp-login.php also give 404 error?
 
Hi. I installed

1.clean Debian 8
2. choose Nginx
3. Added domains
4. Added installatron - which works pefect with DA (at least with apache)
5. I added some apps via Installatron - Wordpress etc.
6. But they show only home page - wp-admin, wp-login.php and any other other pages other than home page, links gives 404 in nginx

Looks like nginx installation script in Direct Admin is not configuring server correctly.I did twice clean installs for server - each time nginx was not working, while installs with apache worked without any problems. So the problem is in DA installation script which configures nginx - probably it doesn't add sites available in etc/nginx - because I don't see those ones in that location
Installatron only installs apps for certain domain - server and managed by DA - so the problem is in Nginx config in DA
 
Do you have files

Code:
ls -la /usr/local/directadmin/data/users/*/nginx.conf
?

show any of them in full.
 
Back
Top