what do I do now?
I would remove that one line.
The line is in neither of the instances
2789 onwards reads as below:
</VirtualHost>
<VirtualHost 5.189.166.189:80>
SuexecUserGroup "#1079" "#1056"
ServerName raybuilders.com
ServerAlias www.raybuilders.com
ServerAlias mail.raybuilders.com
ServerAlias webmail.raybuilders.com
ServerAlias admin.raybuilders.com
DocumentRoot /home/raybuilders/public_html
ErrorLog /var/log/virtualmin/raybuilders.com_error_log
CustomLog /var/log/virtualmin/raybuilders.com_access_log combined
ScriptAlias /cgi-bin/ /home/raybuilders/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/raybuilders/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
AddHandler fcgid-script .php7.2
FCGIWrapper /home/raybuilders/fcgi-bin/php7.2.fcgi .php
FCGIWrapper /home/raybuilders/fcgi-bin/php5.fcgi .php5
FCGIWrapper /home/raybuilders/fcgi-bin/php7.2.fcgi .php7.2
</Directory>
<Directory /home/raybuilders/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.raybuilders.com
RewriteRule ^(?!/.well-known)(.*) https://raybuilders.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.raybuilders.com
RewriteRule ^(?!/.well-known)(.*) https://raybuilders.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.2
FcgidMaxRequestLen 1073741824
Alias /dav /home/raybuilders/public_html
<Location /dav>
DAV on
AuthType Basic
AuthName "raybuilders.com"
AuthUserFile /home/raybuilders/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.2
RewriteEngine off
</Location>
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge
RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
and 5149 onwards reads as below:
</VirtualHost>
<VirtualHost 5.189.166.189:443>
SuexecUserGroup "#1079" "#1056"
ServerName raybuilders.com
ServerAlias www.raybuilders.com
ServerAlias mail.raybuilders.com
ServerAlias webmail.raybuilders.com
ServerAlias admin.raybuilders.com
DocumentRoot /home/raybuilders/public_html
ErrorLog /var/log/virtualmin/raybuilders.com_error_log
CustomLog /var/log/virtualmin/raybuilders.com_access_log combined
ScriptAlias /cgi-bin/ /home/raybuilders/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/raybuilders/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
AddHandler fcgid-script .php7.2
FCGIWrapper /home/raybuilders/fcgi-bin/php7.2.fcgi .php
FCGIWrapper /home/raybuilders/fcgi-bin/php5.fcgi .php5
FCGIWrapper /home/raybuilders/fcgi-bin/php7.2.fcgi .php7.2
</Directory>
<Directory /home/raybuilders/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.raybuilders.com
RewriteRule ^(?!/.well-known)(.*) https://raybuilders.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.raybuilders.com
RewriteRule ^(?!/.well-known)(.*) https://raybuilders.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.2
FcgidMaxRequestLen 1073741824
Alias /dav /home/raybuilders/public_html
<Location /dav>
DAV on
AuthType Basic
AuthName "raybuilders.com"
AuthUserFile /home/raybuilders/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.2
RewriteEngine off
</Location>
SSLEngine on
SSLCertificateFile /home/raybuilders/ssl.combined
SSLCertificateKeyFile /home/raybuilders/ssl.key
SSLCACertificateFile /home/raybuilders/ssl.ca
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge
RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
</VirtualHost>
any ideas what to do now?
That rewrite is also completely unnecessary.
It is sending [already] HTTPS traffic to HTTPS.
I think the FCGI stuff is interfering.
What is the certbot
command line you use?
You could also try changing those two lines to these.
<VirtualHost *:80>
<VirtualHost *:443>
I don't think those two VirtualHosts are processing the inbound requests. If I try /dav/
URI I am not rejected like I should be for no authorization. Oddly though there are two redirects to ports 10000 and 20000 but I wonder if those are being done elsewhere too.
I wouldn't be surprised to find that there is something like a .backup
file in a folder that loads more than just the .conf
files.
I wonder if I just edited the virtualmin server saying don't need the SSL
Then went back and edited it again saying I need the SSL would it start fresh? and so maybe the letsecrypt would do the SSL?
I did that a long time ago with another website and it did work, but not sure if it would work again
This one has certificates already would it delete them? or maybe I delete them? not sure...
Need some help getting this one done
I have another one exactly the same as this as well Grrrrr...
tell me your thoughts
I don't think that would fix it. The VirtualHost for port 80 that you show should respond a certain way. But, it does not. Turning off port 443 and back on won't fix that. Or, I wouldn't think so, Maybe a VirtualMin expert on their forum might know.
Do you have an .htaccess
file anywhere? Maybe that is doing some redirects.
Also, right now at 1703 UTC I made a test request to the /dav URI. It should be rejected with a 403 deny by your VirtualHost Location for that.
Can you check the access log to see if it arrived to that Apache VirtualHost?
/var/log/virtualmin/raybuilders.com_access_log
curl http://raybuilders.com/dav/ForumTest1703
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://raybuilders.com">here</a>.</p>
</body></html>
There's so many files here and the
/var/log/virtualmin/raybuilders.com_access_log
is empty
which one should I look at?
NAME | SIZE | OWNER | MODE | MODIFIED |
---|---|---|---|---|
raybuilders.com_access_log | 0 bytes | raybuilders:apache | 660 | 2023/10/08 - 03:15:02 |
raybuilders.com_access_log-20230709.gz | 53.11 KiB | raybuilders:apache | 660 | 2023/07/09 - 02:53:23 |
raybuilders.com_access_log-20230716.gz | 51.5 KiB | raybuilders:apache | 660 | 2023/07/16 - 02:35:04 |
raybuilders.com_access_log-20230723.gz | 47.12 KiB | raybuilders:apache | 660 | 2023/07/23 - 03:27:19 |
raybuilders.com_access_log-20231006.gz | 548.32 KiB | raybuilders:apache | 660 | 2023/10/06 - 18:21:05 |
raybuilders.com_access_log-20231008.gz | 20 bytes | raybuilders:apache | 660 | 2023/10/06 - 18:29:06 |
raybuilders.com_error_log | 0 bytes | raybuilders:apache | 660 | 2023/10/08 - 03:15:02 |
raybuilders.com_error_log-20230709.gz | 1.28 KiB | raybuilders:apache | 660 | 2023/07/05 - 23:58:41 |
raybuilders.com_error_log-20230716.gz | 1.35 KiB | raybuilders:apache | 660 | 2023/07/15 - 23:42:15 |
raybuilders.com_error_log-20230723.gz | 829 bytes | raybuilders:apache | 660 | 2023/07/22 - 02:13:23 |
raybuilders.com_error_log-20231006.gz | 10.09 KiB | raybuilders:apache | 660 | 2023/10/06 - 14:16:10 |
raybuilders.com_error_log-20231008.gz | 20 bytes | raybuilders:apache | 660 | 2023/10/06 - 18:29:06 |
rkundra.com_access_log | 0 bytes | rkundra:apache | 660 | 2023/10/08 - 03:15:02 |
Is it still empty? Because I just made another request to that domain (below) at UTC 11:13 and another at 11:15. Also one at 11:16 but not with /dav/
curl http://raybuilders.com/dav/ForumTest1113
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://raybuilders.com">here</a>.</p>
</body></html>
Yes still empty
have a look it says 0 bytes and also when I vie it is empty nothing there
raybuilders.com_access_log | 0 bytes | raybuilders:apache | 660 | 2023/10/08 - 03:15:02 |
---|---|---|---|---|
raybuilders.com_access_log-20230709.gz | 53.11 KiB | raybuilders:apache | 660 | 2023/07/09 - 02:53:23 |
raybuilders.com_access_log-20230716.gz | 51.5 KiB | raybuilders:apache | 660 | 2023/07/16 - 02:35:04 |
raybuilders.com_access_log-20230723.gz | 47.12 KiB | raybuilders:apache | 660 | 2023/07/23 - 03:27:19 |
raybuilders.com_access_log-20231006.gz | 548.32 KiB | raybuilders:apache | 660 | 2023/10/06 - 18:21:05 |
raybuilders.com_access_log-20231008.gz | 20 bytes | raybuilders:apache | 660 | 2023/10/06 - 18:29:06 |
raybuilders.com_error_log | 0 bytes | raybuilders:apache | 660 | 2023/10/08 - 03:15:02 |
raybuilders.com_error_log-20230709.gz | 1.28 KiB | raybuilders:apache | 660 | 2023/07/05 - 23:58:41 |
raybuilders.com_error_log-20230716.gz | 1.35 KiB | raybuilders:apache | 660 | 2023/07/15 - 23:42:15 |
raybuilders.com_error_log-20230723.gz | 829 bytes | raybuilders:apache | 660 | 2023/07/22 - 02:13:23 |
raybuilders.com_error_log-20231006.gz | 10.09 KiB | raybuilders:apache | 660 | 2023/10/06 - 14:16:10 |
raybuilders.com_error_log-20231008.gz | 20 bytes | raybuilders:apache | 660 | 2023/10/06 - 18:29:06 |
Then that VirtualHost is definitely not seeing the inbound HTTP requests to that domain. Some other Apache is responding or a different VirtualHost in your httpd.conf
Can you show output of this:
grep -Ei "VirtualHost|ServerName" /etc/httpd/conf/httpd.conf
2789 onwards
</VirtualHost>
<VirtualHost 5.189.166.189:80>
SuexecUserGroup "#1079" "#1056"
ServerName raybuilders.com
ServerAlias www.raybuilders.com
ServerAlias mail.raybuilders.com
ServerAlias webmail.raybuilders.com
ServerAlias admin.raybuilders.com
DocumentRoot /home/raybuilders/public_html
ErrorLog /var/log/virtualmin/raybuilders.com_error_log
CustomLog /var/log/virtualmin/raybuilders.com_access_log combined
ScriptAlias /cgi-bin/ /home/raybuilders/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/raybuilders/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
AddHandler fcgid-script .php7.2
FCGIWrapper /home/raybuilders/fcgi-bin/php7.2.fcgi .php
FCGIWrapper /home/raybuilders/fcgi-bin/php5.fcgi .php5
FCGIWrapper /home/raybuilders/fcgi-bin/php7.2.fcgi .php7.2
</Directory>
<Directory /home/raybuilders/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.raybuilders.com
RewriteRule ^(?!/.well-known)(.*) https://raybuilders.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.raybuilders.com
RewriteRule ^(?!/.well-known)(.*) https://raybuilders.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.2
FcgidMaxRequestLen 1073741824
Alias /dav /home/raybuilders/public_html
<Location /dav>
DAV on
AuthType Basic
AuthName "raybuilders.com"
AuthUserFile /home/raybuilders/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.2
RewriteEngine off
</Location>
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge
RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
THEN 5149 ONWARDS
</VirtualHost>
<VirtualHost 5.189.166.189:443>
SuexecUserGroup "#1079" "#1056"
ServerName raybuilders.com
ServerAlias www.raybuilders.com
ServerAlias mail.raybuilders.com
ServerAlias webmail.raybuilders.com
ServerAlias admin.raybuilders.com
DocumentRoot /home/raybuilders/public_html
ErrorLog /var/log/virtualmin/raybuilders.com_error_log
CustomLog /var/log/virtualmin/raybuilders.com_access_log combined
ScriptAlias /cgi-bin/ /home/raybuilders/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/raybuilders/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
AddHandler fcgid-script .php7.2
FCGIWrapper /home/raybuilders/fcgi-bin/php7.2.fcgi .php
FCGIWrapper /home/raybuilders/fcgi-bin/php5.fcgi .php5
FCGIWrapper /home/raybuilders/fcgi-bin/php7.2.fcgi .php7.2
</Directory>
<Directory /home/raybuilders/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.raybuilders.com
RewriteRule ^(?!/.well-known)(.*) https://raybuilders.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.raybuilders.com
RewriteRule ^(?!/.well-known)(.*) https://raybuilders.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.2
FcgidMaxRequestLen 1073741824
Alias /dav /home/raybuilders/public_html
<Location /dav>
DAV on
AuthType Basic
AuthName "raybuilders.com"
AuthUserFile /home/raybuilders/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.2
RewriteEngine off
</Location>
SSLEngine on
SSLCertificateFile /home/raybuilders/ssl.combined
SSLCertificateKeyFile /home/raybuilders/ssl.key
SSLCACertificateFile /home/raybuilders/ssl.ca
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge
RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
</VirtualHost>
Is there a problem doing this?
grep -Ei "VirtualHost|ServerName" /etc/httpd/conf/httpd.conf
# ports, instead of the default. See also the <VirtualHost>
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
# All of these directives may appear inside <VirtualHost> containers,
# ServerName gives the name and port that the server uses to identify itself.
#ServerName www.example.com:80
# If you do not specify an ErrorLog directive within a <VirtualHost>
# logged here. If you *do* define an error logfile for a <VirtualHost>
# If you do not define any access logfiles within a <VirtualHost>
# define per-<VirtualHost> access logfiles, transactions will be
</VirtualHost>
<VirtualHost 5.189.166.189:80>
ServerName raybuilders.com
and also at the bottom again as below
</VirtualHost>
<VirtualHost 5.189.166.189:443>
ServerName raybuilders.com
</VirtualHost>
Okay. And there is no other output?
Can you try
<VirtualHost *:443>
CHANGED IT AS BELOW SHOULD I TRY NOW?
</VirtualHost>
<VirtualHost *:80>
SuexecUserGroup "#1079" "#1056"
ServerName raybuilders.com
ServerAlias www.raybuilders.com
ServerAlias mail.raybuilders.com
ServerAlias webmail.raybuilders.com
ServerAlias admin.raybuilders.com
DocumentRoot /home/raybuilders/public_html
ErrorLog /var/log/virtualmin/raybuilders.com_error_log
CustomLog /var/log/virtualmin/raybuilders.com_access_log combined
ScriptAlias /cgi-bin/ /home/raybuilders/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/raybuilders/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
AddHandler fcgid-script .php7.2
FCGIWrapper /home/raybuilders/fcgi-bin/php7.2.fcgi .php
FCGIWrapper /home/raybuilders/fcgi-bin/php5.fcgi .php5
FCGIWrapper /home/raybuilders/fcgi-bin/php7.2.fcgi .php7.2
</Directory>
<Directory /home/raybuilders/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.raybuilders.com
RewriteRule ^(?!/.well-known)(.*) https://raybuilders.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.raybuilders.com
RewriteRule ^(?!/.well-known)(.*) https://raybuilders.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.2
FcgidMaxRequestLen 1073741824
Alias /dav /home/raybuilders/public_html
<Location /dav>
DAV on
AuthType Basic
AuthName "raybuilders.com"
AuthUserFile /home/raybuilders/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.2
RewriteEngine off
</Location>
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge
RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
AND
</VirtualHost>
<VirtualHost *:443>
SuexecUserGroup "#1079" "#1056"
ServerName raybuilders.com
ServerAlias www.raybuilders.com
ServerAlias mail.raybuilders.com
ServerAlias webmail.raybuilders.com
ServerAlias admin.raybuilders.com
DocumentRoot /home/raybuilders/public_html
ErrorLog /var/log/virtualmin/raybuilders.com_error_log
CustomLog /var/log/virtualmin/raybuilders.com_access_log combined
ScriptAlias /cgi-bin/ /home/raybuilders/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/raybuilders/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
AddHandler fcgid-script .php7.2
FCGIWrapper /home/raybuilders/fcgi-bin/php7.2.fcgi .php
FCGIWrapper /home/raybuilders/fcgi-bin/php5.fcgi .php5
FCGIWrapper /home/raybuilders/fcgi-bin/php7.2.fcgi .php7.2
</Directory>
<Directory /home/raybuilders/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.raybuilders.com
RewriteRule ^(?!/.well-known)(.*) https://raybuilders.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.raybuilders.com
RewriteRule ^(?!/.well-known)(.*) https://raybuilders.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.2
FcgidMaxRequestLen 1073741824
Alias /dav /home/raybuilders/public_html
<Location /dav>
DAV on
AuthType Basic
AuthName "raybuilders.com"
AuthUserFile /home/raybuilders/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RemoveHandler .php
RemoveHandler .php5
RemoveHandler .php7.2
RewriteEngine off
</Location>
SSLEngine on
SSLCertificateFile /home/raybuilders/ssl.combined
SSLCertificateKeyFile /home/raybuilders/ssl.key
SSLCACertificateFile /home/raybuilders/ssl.ca
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge
RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
</VirtualHost>