Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: Cannot Access Second Website After Setting Up VHost |
|
Author |
|
oktrik
Joined: 23 Sep 2021 Posts: 6 Location: NTT
|
Posted: Fri 21 Jul '23 14:59 Post subject: Cannot Access Second Website After Setting Up VHost |
|
|
I'm currently trying to set up a vhost configuration for my second domain on CentOS 7 with Cloudflare.
Code: | Server version: Apache/2.4.6 (CentOS)
Server built: May 30 2023 14:01:11 |
I executed the following commands for the directory path:
Quote: | 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:
Code: | <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://127.0.0.1:9080"
</If>
</FilesMatch>
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
</Directory>
<IfModule dir_module>
DirectoryIndex index.php index.htm index.html
</IfModule>
SSLEngine on
#SSLProtocol -All +TLSv1.3
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
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
</VirtualHost> |
However, the problem is that after restarting httpd, the site cannot be accessed and I'm getting the following error using the Opera browser:
Code: | This site can't be reached
secondwebsite.net refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED |
Can anyone help me identify which part might be causing the issue? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7355 Location: Germany, Next to Hamburg
|
Posted: Sun 25 Feb '24 23:36 Post subject: |
|
|
It looks like it is the Cloudflare encryption mode. |
|
Back to top |
|
|
|
|
|
|