Anope IRC Services
Anope Support => 2.0.x/1.9.x Support => Topic started by: Ivan 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.
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"
}
}
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;
}
-
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).