This could be caused by IIS not being setup to handle extensionless static files - ssl

The ACME server was probably unable to reach http://mydomain/.well-known/acme-challenge/LLtRq6EdfBLmxyhzlFEqL
kDXBUFLsQbaea6A5kiJxIo
Check in a browser to see if the answer file is being served correctly.
This could be caused by IIS not being setup to handle extensionless static
files. Here's how to fix that:
1. In IIS manager goto Site/Server->Handler Mappings->View Ordered List
2. Move the StaticFile mapping above the ExtensionlessUrlHandler mappings.
(like this http://i.stack.imgur.com/nkvrL.png)
3. If you need to make changes to your web.config file, update the one
at C:\applications\letsencrypt\web_config.xml
Getting this error
While creatng ssl certifcate using letsencrypt
tried
1) If you can't browse to this configcheck file in your web browser (http://{your site}/.well-known/acme-challenge/configcheck then the Lets Encrypt service can't access the files it needs either.
=> configcheck is not getting created
You can edit the web.config file in this folder to get extensionless files working, then you can re-request your certificate. A mimeMap entry for either "." or ".*" usually works depending on your operating system version.
=> Edited web.config tried both "." or ".*"
No success
Can anyone please suggest steps to follow
i am using aws sever windows 2008 R2

If you have redirected your domain name from http to https
in virtual host of apache http.conf file
This will cause this issue
please comment that redirect and try it
Got solved

Related

cPanel throwing 503 error after editing a file in the www directory

I am struggling with this particular issue and cPanel's documentation really has not been any help.
This is a fresh setup of centOS7 (clean install) and cPanel for provisioning.
I am my own host - with a static IP.
I can login to cPanel on both common ports (2087 root and 2083 )
Ports 80,443,21,22 and 3306 are open
Here is my issue in a nutshell:
When I create an account in cPanel and then login as that account I can create a placeholder index.php file that simply just says "hi".
The problem is. After I edit the file once; if I try to create any other file or even edit the index.php file a second time? the domain will throw a 503 error. If I try to chmod the public_html folder in any way? cPanel throws a 503 error. If I try to extract my gitHub repo into the www folder? cPanel throws a 503 error.
The only way to fix it is to Terminate/Delete the account and then re-create it. So this is an endless loop of working/busted/working/busted.
The cPanel documentation has really been of zero help. Their support staff doesn't seem to have a clue either.
Is there a security setting I am missing? I have checked the log files. It is not giving me any info about why it is throwing an 503.
I have been going in circles for a day on this so any help is appreciated.
<?php
// Sample Placeholder Page
?>
<h1>This is a sample placeholder for cPanel</h1>
I expect that when editing a file such as index.php it should load properly.
The output is a 503 error after editing the file more than once or adding any other file.
The issue was caused by a corrupted PHP install by Easy Apache. Running a manual rebuild and switching from PHP 7.2 to 7.3 fixed the issue.

Unable to add header on Apache webserver hosted by azure

I am trying to enable Anti clickjacking on a website hosted by Azure.
Its a shared hosting package run on Apache server. Problem is that i cant find the correct conf file to modify and add this line of code to:
header always set x-frame-options "SAMEORIGIN"
we found a file called apache2.conf and added this but after restarting apache server the line is removed from the conf.
Anyone any ideas what i can do ?
The header code you are trying to add should be applied to a .htaccess file, placed in the folder where you want the action to happen. In your case it's likely the root of your site.
Be warned, though, that I've just ran in to an issue whereby mod_headers.c are not enabled in my container. So even if you put the code above in to a .htaccess file, it still may not work.
I'm interested in knowing where you found the apache2.conf file though. I can't see that on mine (but that may be due to me replying a custom docker container).

How to create an Apache Virtual Hosts for a non-local website?

I installed Apache on my local machine. I created 2 Apache virtual hosts with conf files for www.mysite.local and www2.mysite.local. I followed this tutorial : https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts
Now I would like to create a conf file for www.google.com and display a message writing in the index.html file. I followed the same tutorial, I created a index.html file in /var/www/www.google.com/public_html/, I created a file www.google.com.conf in /etc/apache2/sites-available, I edit my local file adding www.google.com on my VPS IP address. But google didn't display the message I want and display an error : "Your connection is not private".
This process doesn't work because it's not a local site? Do you know if there is an other process to configure non local websites?
Thank you!
This is because your browser will have cached that www.google.com has HSTS, so it will only connect to that site with HTTPS. For what you're trying to do, which is to have a faked domain, why not use the explicitly non-real domain example.com?

Does configuring a web server with SSL break regular HTTP

I'm in the process of getting a SSL certificate for my website which i'm running of a VPS. My website also serves as a web service for some ios/android applications to fetch data from. I'm just wondering if installing and configuring a SSL Certificate in Apache will force everyone to contact the web server over HTTPS and refuse regular HTTP calls. Hince will my applications break until I've released an update making all server calls to HTTPS?
Cheers
Apache can handle both http and https at the same time.
Normally you setup your http site under something like httpd.conf which includes a line (might be commented out) something like:
Include extra/httpd-ssl.conf
which tells apache to load additional configuration for the httpd-ssl.conf file located in the 'extra' directory.
if you did a standard install of apache then the httpd-ssl.conf file is already there with a generic template for the HTTPS site, just modify it as necessary and (if needed) uncomment the Include line above in httpd.conf.

How disable direct call files on web dirrectory?

My server was built on Apache and Nginx.
There are some directories with js scripts Node on root directory web site.
Via url address i can call direct file such like: domen.com/node/notific.js
How as it can be blocked?
I saw apache tutorial and found that it possible set in apache2.conf, to specify here in the Servername part param index-options, but it acts only on the prohibition directories.
And what you advice check me for more security my directories?
Thanks