Apache Lounge


About Forum Index Downloads Search Register Log in RSS X

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Cannot Access Second Website After Setting Up VHost

Joined: 23 Sep 2021
Posts: 6
Location: NTT

PostPosted: Fri 21 Jul '23 14:59    Post subject: Cannot Access Second Website After Setting Up VHost Reply with quote

I'm currently trying to set up a vhost configuration for my second domain on CentOS 7 with Cloudflare.

Server version: Apache/2.4.6 (CentOS)
Server built: May 30 2023 14:01:11

I executed the following commands for the directory path:

chown apache:apache /var/www/html/secondweb -R
sudo chmod -R 755 /var/www/html/secondweb

And here is the content of the vhost configuration:

<VirtualHost *:443>
    ServerAdmin webmaster@secondwebsite
    DocumentRoot "/var/www/html/secondweb"
    ServerName secondwebsite.net
    ErrorLog /var/www/html/log
    CustomLog /var/www/html/log-requests.txt combined

    <FilesMatch "\.php$">
        <If "-f %{REQUEST_FILENAME}">
            SetHandler "proxy:fcgi://"

    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
    AddHandler php80-fcgi .php
    Action php80-fcgi /cgi-bin/php80.fcgi

    <Directory "/var/www/html/secondweb">
        Options -Indexes +FollowSymLinks +Includes +ExecCGI
        AllowOverride All
        Require all granted

    <IfModule dir_module>
        DirectoryIndex index.php index.htm index.html

    SSLEngine on
    #SSLProtocol -All +TLSv1.3
    SSLCertificateFile /var/www/html/cer.pem
    SSLCertificateKeyFile /var/www/html/cer.key
    SSLCACertificateFile /var/www/html/origin.pem
    #Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
    #Header always set Content-Security-Policy "default-src 'self';"
    ServerSignature Off
    #ServerTokens Prod

However, the problem is that after restarting httpd, the site cannot be accessed and I'm getting the following error using the Opera browser:

This site can't be reached
secondwebsite.net refused to connect.


    Checking the connection
    Checking the proxy and the firewall

Can anyone help me identify which part might be causing the issue?
Back to top
James Blond

Joined: 19 Jan 2006
Posts: 7294
Location: Germany, Next to Hamburg

PostPosted: Sun 25 Feb '24 23:36    Post subject: Reply with quote

It looks like it is the Cloudflare encryption mode.
Back to top

Reply to topic   Topic: Cannot Access Second Website After Setting Up VHost View previous topic :: View next topic
Post new topic   Forum Index -> Apache