Score:0

Apache web server issue

us flag

Before adding the certificate I could access the following site

http://website.com:4043/web/login

But after adding the certificate I can't access the full URL with https.
I can however access only https://website.com

Any support please.

us flag
when add the mentioned code the following error appear :cannot define multiple listeners on the same ip:port @matigo
Score:0
in flag

Assuming you're running a modern version of Ubuntu, you will want to ensure your Apache virtual configuration file looks something like this:

Listen 443
Listen 4043

<VirtualHost *:443>
    ServerName website.com

    SSLProxyEngine on
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/server.crt
    SSLCertificateKeyFile /etc/ssl/private/server.key
    DocumentRoot /var/www/html
</VirtualHost>

<VirtualHost *:4043>
    ServerName website.com

    SSLProxyEngine on
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/server.crt
    SSLCertificateKeyFile /etc/ssl/private/server.key
    DocumentRoot /var/www/html
</VirtualHost>

From here, you can set up a quick little .htaccess rule to ensure that traffic is properly redirected to 4043 rather than the server default of 443. For example:

RewriteEngine on

# If the port isn't 4043
RewriteCond %{SERVER_PORT} !^4043$

# We redirect to the same address with the proper port
RewriteRule ^(.*)$ https://%{HTTP_HOST}:4043/$1 [R=301,L]

IMPORTANT: Do not simply copy and paste this stuff. Look at the text and make adjustments for your own environment, which is unknown to everyone except you.

us flag
when add the mentioned code the following error appear :cannot define multiple listeners on the same ip:port
in flag
Note the "important" bit. Also note that your question leaves *a lot* of detail out. Hence the "do not simply copy and paste" message. If you would like a more specific solution, please provide more specific information.
pa4080 avatar
cn flag
The `:4043` thing probably is some kind of control panel and probably it is served by another application (not Apache). In that case we can use Apache as reverse proxy and pass `website.com/web/login` to `127.0.0.1:4043/web/login` or something like this... @Walid?
us flag
I did it and working but after login redirected to another directory as follow http://e127.0.0.1/web with error 404 not found , The requested URL was not found on this server, please support me.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.