Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  


Pages: [1]   Go Down

Author Topic: nginx configuration for webcpanel  (Read 3363 times)

0 Members and 1 Guest are viewing this topic.


  • Anope User
  • Offline Offline
  • Posts: 12
nginx configuration for webcpanel
« on: January 03, 2017, 01:41:10 PM »

Didn't find nginx configuration for webcpanel:

Managed to setup nginx to properly open it, but unable to login, it returns back to login page.

Please advise.

Code: [Select]
        name = "m_httpd"

                /* Name of this service. */
                name = "httpd/main"

                /* IP to listen on. */
                ip = ""

                /* Port to listen on. */
                port = 8080

                /* Time before connections to this server are timed out. */
                timeout = 30

                /* Listen using SSL. Requires an SSL module. */
                ssl = yes

                /* If you are using a reverse proxy that sends one of the
                 * extforward_headers set below, set this to its IP.
                 * This allows services to obtain the real IP of users by
                 * reading the forwarded-for HTTP header.
                extforward_ip = ""

                /* The header to look for. These probably work as is. */
                extforward_header = "X-Forwarded-For Forwarded-For"
Code: [Select]
set $path /somefolder/anope;
location ~ /somefolder/anope {
        rewrite /somefolder/anope/(.*) /$1  break;

        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_redirect 'https://$host/' '$path/';
        proxy_cookie_path '/' '$path/';

        sub_filter 'href=\"//' 'href=\"https://';
        sub_filter 'src=\"//' 'src=\"https://';
        sub_filter 'href=\"/' 'href=\"$path/';
        sub_filter 'src=\"/' 'src=\"$path/';
        sub_filter 'action=\"/' 'action=\"$path/';
        sub_filter 'url(\'/' 'url(\'$path/';
        sub_filter_types text/css application/javascript text/xml application/atom+xml application/rss+xml application/json text/plain;
        sub_filter_once off;

Krzysztof Beresztant

  • Anope User
  • Offline Offline
  • Posts: 4
Re: nginx configuration for webcpanel
« Reply #1 on: May 14, 2017, 11:49:54 AM »

You need to create a new subdomain for the webcpanel. It won't work in an subdirectory (unless you change the template and webcpanel source).
Pages: [1]   Go Up