Anope Support > 2.0.x/1.9.x Support

Webcpanel Connection via HTTPS dont work

<< < (2/2)

Mohd Fhazal Aznan:
PeGaSuS teach me how to solve this and it's work

first in your ssh enable the apache mod :

a2enmod dir userdir rewrite headers session session_cookie proxy proxy_html proxy_http proxy_wstunnel lbmethod_bytraffic

sudo systemctl reload apache2

NOTE : if you don't have any other mod that is required by apache when you restart your apache just type in your ssh a2enmod (module name)

example :

--- Code: ---Apr 04 01:26:53 vps apachectl[294820]: AH00526: Syntax error on line 2 of /etc/apache2/sites-enabled/
Apr 04 01:26:53 vps apachectl[294820]: Invalid command 'ProxyPreserveHost', perhaps misspelled or defined by a module not included in the server configuration
--- End code ---

a2enmod ProxyPreserveHost

now edit all the files accordingly as below :

--- Code: ---###
# On
<VirtualHost *:80>
    DocumentRoot /var/www/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} [OR]
RewriteCond %{SERVER_NAME}
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
# On
<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/
SSLCertificateKeyFile /etc/letsencrypt/live/
RewriteEngine On
ProxyVia On
ProxyAddHeaders On
RemoteIPHeader X-Forwarded-For
RequestHeader set X-Forwarded-For "expr=%{REMOTE_ADDR}e"
ProxyPass /
ProxyPassReverse /
# On Anope modules.conf
        name = "m_httpd"
                /* Name of this service. */
                name = "httpd/main"
                /* IP to listen on. */
                ip = ""
                /* Port to listen on. */
                port = 8070
                /* Time before connections to this server are timed out. */
                timeout = 30
                /* Listen using SSL. Requires an SSL module. */
                ssl = no
                /* 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.
                 * Multiple IP addresses can be specified separated by a space character.
                #extforward_ip = ""
                /* The header to look for. These probably work as is. */
                extforward_header = "X-Forwarded-For Forwarded-For"

--- End code ---

thanks @PeGaSuS  ;D he even teach me how to modify the webcpanel interface.


[0] Message Index

[*] Previous page

Go to full version