Softaculous


Topic : Want custom config to proxypass to 127.0.0.1:8000 using nginx


Posted By: naresh335 on November 24, 2022, 11:56 am
Hello everyone,
                      Was trying webuzo panel, looks great product. However, when I wanted to add a proxy configuration there are no docs for the same nor any configuration on the panel.

I have achieved although what I wanted to do by customizing nginx config directly in
Code
/usr/local/apps/nginx/etc/conf.d/userVH.conf
, however I feel that would be overwritten as soon as any changes are done in webuzo panel and nginx reloaded by webuzo.

Do you have any configuration templates specifically to do this ? I want to overwrite a particular domain with this proxypass config.


Quote
location / {
        proxy_pass  localhost:8000;
      proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}


Posted By: surajmore on November 28, 2022, 11:09 am | Post: 1
Hi,

You can not use location directly you will have to write the location under server section like example below:

server {
    listen        YOUR_SERVER_IP:80;
    server_name    example.com http://www.example.com;
   
   
    # The Document Root
    root        /home/username/public_html;
   
    location / {
            proxy_pass  http://127.0.0.1:8000;
          proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

Posted By: naresh335 on November 29, 2022, 1:40 am | Post: 2
thanks for the reply but you understood it wrong,

I want to enable proxypass in nginx but there is no option in webuzo to do it.

the above config works just fine and is added in correct place, but since nginx config is generated by webuzo any direct changes to file

Code
/usr/local/apps/nginx/etc/conf.d/userVH.conf

will be overwritten by webuzo as soon as webuzo panel does it's config updates.


Please help where can I add proxpass config (to proxy traffic to an nodejs app on port 8000) for my website.

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.