Setting up AutoSSL get 404 error
Hello,
I have created the file in my cPanel in the public_html called THE_TEXT_FILE.txt, but I get a 404 error when running
from the cli What do I set so that Comodo and Let's Encrypt can access the file THE_TEXT_FILE.txt.
curl --user-agent "COMODO DCV" --insecure --max-time 10 --retry 0 http://mydomain.com/THE_TEXT_FILE.txtfrom the cli What do I set so that Comodo and Let's Encrypt can access the file THE_TEXT_FILE.txt.
-
Hi @Uneschewed What do you get when you run that same command with the -vv flag? curl -vv --user-agent "COMODO DCV" --insecure --max-time 10 --retry 0 http://mydomain.com/THE_TEXT_FILE.txt0 -
I still get 404 I have DCV passthrough enabled. Do I need to whitelist the ip addresses for comodo and letsencrypt? If so, what are the ip addresses? 0 -
I have whitelisted the ip addresses on my server, but still getting 404 not found reported from autossl. 0 -
Just to be sure, did you create the file with the ownership of the account or as root? If you're getting a 404 on the text file manually, you'll definitely continue to get it with AutoSSL Do you have anything in the .htaccess file for that domain? 0 -
Just to be sure, did you create the file with the ownership of the account or as root? If you're getting a 404 on the text file manually, you'll definitely continue to get it with AutoSSL Do you have anything in the .htaccess file for that domain?
I created the file using cPanel File Manager as my account. I have an .htaccess but it worked for AutoSSL before.0 -
I have an .htaccess but it worked for AutoSSL before.
I'm looking for what specifically is in the .htaccess file here. In some cases a plugin could have added entries or there could be something causing the txt file not to be able to be read.0 -
I'm looking for what specifically is in the .htaccess file here. In some cases a plugin could have added entries or there could be something causing the txt file not to be able to be read.
I have the following information in the mod rewrite:# Disable Apache MultiViews since it # may conflict with the GUI installer Options -Indexes -MultiViews RewriteEngine On # BEGIN Redirect to https / SSL #RewriteCond %{HTTPS} !on #RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] #RewriteCond %{HTTPS} off #RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} # END Redirect to https / SSL # Redirect Trailing Slashes If Not A Folder... #RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... redirect directroy or folder that does not exist to index RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Redirect subdomains that dont exist # Set rediret for addon domain subdomain in cPanel Redirects # Set redirect for addon domain subdomain folder Redirect 301 /example1.com https://www.example.com/index.php Redirect 301 /example.org https://www.example.com/index.php Redirect 301 /example.church https://www.example.com/index.php Redirect 301 /example2.com https://www.example.com/index.php Redirect 301 /example.tube https://www.example.com/index.php # Set redirect RewriteCond %{HTTP_HOST} ^(.+)\.example\.com$ [NC] RewriteRule ^ https://example.com/ [L,R] RewriteCond %{HTTP_HOST} ^(.+)\.example\.com$ [NC] RewriteRule ^ https://example.com/ [L,R] RewriteCond %{HTTP_HOST} ^(.+)\.example\.org$ [NC] RewriteRule ^ https://example.org/ [L,R] RewriteCond %{HTTP_HOST} ^(.+)\.example\.gold$ [NC] RewriteRule ^ https://example.gold/ [L,R] RewriteCond %{HTTP_HOST} ^(.+)\.example\.church$ [NC] RewriteRule ^ https://example.church/ [L,R] RewriteCond %{HTTP_HOST} ^(.+)\.example\.com$ [NC] RewriteRule ^ https://example.com/ [L,R] RewriteCond %{HTTP_HOST} ^(.+)\.example\.tube$ [NC] RewriteRule ^ https://example.tube/ [L,R] # Redirect ONLY FOR MAIN DOMAIN example.com RewriteCond %{HTTP_HOST} ^[^.]+\.(example\.com)$ [NC] RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L,NE] # Use WebP # Does browser explicitly support webp? RewriteCond %{HTTP_USER_AGENT} Chrome [OR] # OR Is request from Page Speed RewriteCond %{HTTP_USER_AGENT} "Google Page Speed Insights" [OR] # OR does this browser explicitly support webp RewriteCond %{HTTP_ACCEPT} image/webp [OR] # AND does a webp image exists? RewriteCond %{DOCUMENT_ROOT}/$1\.webp -f # THEN send the webp image and set the env var webp RewriteRule (.+)\.(?:jpeg|png)$ $1.webp [NC,T=image/webp,E=webp,L] # If REDIRECT_webp env var exists, append Accept to the Vary header Header append Vary Accept env=REDIRECT_webp
Mod note, post edited. Please review:0 -
I have read the guide throughly and will follow its decree. 0 -
May we continue the estimate Houston? I would like to setup my domains, as part of the problem I am having is that my main domain is redirecting to the following: mydomain.com/cgi-sys/defaultwebpage.cgi 0 -
I also just set up the server. My configuration is as follows: /etc/redhat-release:CentOS Linux release 7.6.1810 (Core) /usr/local/cpanel/version:11.78.0.24 /var/cpanel/envtype:xen hvm CPANEL=release0 -
I have already ran the following commands: sudo /scripts/install_lets_encrypt_autossl_provider sudo /scripts/rebuildhttpdconf sudo service httpd restart
What is the next step to make AutoSSL work with Comodo and LetsEncypt and make the domain no longer redirect to mydomain.com/cgi-sys/defaultwebpage.cgi and fix the 404 error for the text file stored at my root public_html folder when using the following command at Linux CLI?curl --user-agent "COMODO DCV" --insecure --max-time 10 --retry 0 http://mydomain.com/THE_TEXT_FILE.txt0 -
Can you temporarily move/rename the .htaccess file, there's a lot of redirects there and I'd like to rule out the .htaccess for both the default page and 404 issues with AutoSSL. Once it's renamed try running the AutoSSL check once more and/or clearing the browser's cache and viewing the page. 0 -
I deleted the .htaccess file and ran the AutoSSL in cPanel, then I tried clearing browser cache and then ran AutoSSL again. The result is that the txt file I created in the root of the public_html directory shows a 404 on browser, 404 in curl on Linux CLI, and the temporary file AutoSSL tries to create also shows a 404 which is displayed in cPanel SSL/TLS Status. 0 -
Can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved. Thanks! 0 -
I have created a support ticket and the ticket number is 12433641. 0 -
Hi @Uneschewed Great, I'm following that ticket and I'll update here with the outcome, I do see someone is already working with you on it as well. 0
Please sign in to leave a comment.
Comments
16 comments