Run some sites directly by nginx without reverse proxy

JohnyByk

Verified User
Joined
Mar 7, 2012
Messages
232
I have configured DA to work with naginx as reverse proxy form apache:
webserver=nginx_apache


Is easy way to run sites belongs to some users without reverserse proxy - directly by nginx?
Some users hat sites optimized for nginx and they don't need apache.

Regards
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,305
Location
LT, EU
Yes, it's easy to do this, but it might cause additional problems, because PHP is not directly loaded into nginx :) And the only mode supported would be PHP-FPM.
 

JohnyByk

Verified User
Joined
Mar 7, 2012
Messages
232
I'm using php-fpm. Can you tell me how to run site by nginx directly :)? I probably need to do a custom configuration for Nginx, or
maybe there is an easier way?
 
Last edited:

ideallia

New member
Joined
Jun 20, 2020
Messages
1
@smtalk I'm having the same question.I'd like to setup a static subdomain (static.[domain].ext) which is a symlink to a directory with only static files (images, css, js, icons, etc.) and I'd like to have requests to that specific subdomain being processed without apache, but only via nginx, while the main domain still handles the files via apache, like is possible in the latest Plesk release (see screenshot).

PS: I'm running PHP-FPM with apache_nginx, but I don't know how to "remove" the virtualhost section for that specific subdomain in Directadmin.
I already have tried to set the following in Custom HTTPD configuration > httpd.conf:
Code:
|*if SUB="static"|
|?WEBSERVER=nginx|
|?PHP=OFF|
|*endif|
but that doesn't work as I already expected.
Could you help me out a bit?
 

Attachments

Top