Jump to content
Froxlor Forum
  • 0

Support Nginx in Froxlor


Emilien

  

23 members have voted

  1. 1. Do you like Froxlor support Nginx webserver?

    • Yes, I need
    • It isn't important
    • No, I don't need


Question

4 answers to this question

Recommended Posts

And to what extent support for nginx is needed?

I use it as a proxy in front of apache, since on the same server I maintain both domains controlled by syscp and legacy domains (added manually to configs long time ago)

syscp domains and legacy domains reside in different FreeBSD jails, to add new ones to nginx I use simple script, ran from cron every 10 minutes.

Nginx config looks like this:

 

worker_processes  1;


events {
   worker_connections  1024;
}


http {
   include       mime.types;
   default_type  application/octet-stream;

   server_names_hash_max_size 1024; 
   server_names_hash_bucket_size 128; 

   sendfile        on;
   #tcp_nopush     on;

   #keepalive_timeout  0;
   keepalive_timeout  65;

   gzip  on;

       server {
               listen  192.168.0.2:80 default;
               proxy_set_header Host $http_host;
               location / {
                       proxy_pass http://192.168.0.3:80/;
               }
       }
       server {
               listen  192.168.0.2:80;
               include         webcp.sites;    #Auto-generated sites list
               proxy_set_header NGINX-Forwarded-for $remote_addr;
               proxy_set_header Host $http_host;
               location / {
                       proxy_pass http://192.168.0.1:80/;        
               }
       }
}

 

And script for cron is:

#!/bin/sh
/bin/echo "select CONCAT('server_name www.',pd.domain,' ',pd.domain,' ;') from panel_domains as pd where pd.email_only=0 AND parentdomainid = 0 ORDER BY pd.id;" | /usr/local/bin/mysql -s -u syscp -pPassword -h 192.168.0.1 syscp > /usr/local/etc/nginx/webcp.sites
/bin/echo "select CONCAT('server_name ',pd.domain,' ;') from panel_domains as pd where pd.email_only=0 AND parentdomainid > 0 ORDER BY pd.id;" | /usr/local/bin/mysql -s -u syscp -pPassword -h 192.168.0.1 syscp >> /usr/local/etc/nginx/webcp.sites
/usr/local/etc/rc.d/nginx reload

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...