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/irc.mydomain.com.my.conf:
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 your.domain.org.conf
###
<VirtualHost *:80>
    ServerAdmin webmaster@your.domain.com
    ServerName your.domain.com
    ServerAlias www.your.domain.com
    DocumentRoot /var/www/your.domain.com
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =your.domain.com [OR]
RewriteCond %{SERVER_NAME} =www.your.domain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
 
 
###
# On your.domain.com-le-ssl.conf
###
<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerAdmin webmaster@localhost
    ServerName your.domain.com
    ServerAlias www.your.domain.com
    DocumentRoot /var/www/your.domain.com
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
 
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/your.domain.com-0001/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/your.domain.com-0001/privkey.pem
RewriteEngine On
ProxyVia On
ProxyAddHeaders On
RemoteIPHeader X-Forwarded-For
RequestHeader set X-Forwarded-For "expr=%{REMOTE_ADDR}e"
ProxyPass / http://127.0.0.1:8070/
ProxyPassReverse / http://127.0.0.1:8070/
</VirtualHost>
</IfModule>
 
 
###
# On Anope modules.conf
###
module
{
        name = "m_httpd"
 
        httpd
        {
                /* Name of this service. */
                name = "httpd/main"
 
                /* IP to listen on. */
                ip = "127.0.0.1"
 
                /* 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 = "127.0.0.1"
 
                /* 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.

Navigation

[0] Message Index

[*] Previous page

Go to full version