Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

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

0 Members and 1 Guest are viewing this topic.

Ivan

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

Didn't find nginx configuration for webcpanel:
https://wiki.anope.org/index.php/2.0/Modules/webcpanel

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

Please advise.

Code: [Select]
module
{
        name = "m_httpd"

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

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

                /* 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 = "127.0.0.1"

                /* 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_pass https://127.0.0.1:8080;

        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;
}
Logged

k4be

  • Anope User
  • Offline Offline
  • Posts: 3
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).
Logged
Pages: [1]   Go Up