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://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:
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?
second website running normally