Cloudflare - Redirect DomainA to DomainB SSL Issue [closed] - cloudflare

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
we have two domains, A and B, where I'm looking to get DomainA to redirect all requests to DomainB. There is no server behind DomainA. I've followed this tutorial exactly as presented on Cloudflare:
https://community.cloudflare.com/t/redirecting-one-domain-to-another/81960
And it works just fine for non-https traffic. Attempting to go to https://domaina.com gives me NET::ERR_CERT_COMMON_NAME_INVALID while http://domaina.com redirects to https://domainb.com just fine.
My page rules reflect the tutorial - that is *domaina.com/* 301 redirects to https://domainb.com/$2
My SSL options in Cloudflare is set to "Full". The orange clouds are on as well for both # and www on DomainA which currently are A records. I've tried CNAME as well. Has anyone else run into this before? What might I be doing wrong?

Try setting your SSL option to "Flexible" instead. Since your domain A doesn't have SSL setup, "Full" wouldn't work as it requires SSL on the origin server as well.

Free Clouflare plan will give you "Free certificate".
The Free Certificate's Common Name is always pointed to sni.cloudflaressl.com.
You can't change the common name unless you order Advanced Certificate Manager for $10/month.
You can see Advanced Certificate Manager in SSL > Edge Certificates > Order Advanced Certificate:
Sample "Free Certificate":
The certificate's common name is set to sni.cloudflaressl.com but it is valid to all major OS and browser because the Subject Alternative Name (SAN) in the certificate contains your domain.

Related

Reduce server response time - apache2 on debian 7 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have pretty well-optimized website, PageSpeed Insights tool shows good results, but Google keeps saying reduce server response time which is 0.46 seconds. And it must not be greater than 200ms.
I have tried to delete all my htaccess content, then replace index.php with an empty index.html file, but server response remained the same. I am using a virtual private server with Debian 7and storing 2 websites with SSL on different IP addresses. The second site responds perfectly in 144 ms.
So, I can't find the reason why one site loads under 200ms and other in 460ms. I'm pretty sure that server has enough resources.
I would be grateful for the ideas.
You could try some tweaks on your apache server. Can't guarantee that you'll get the desired result but it's an easy job and I think you have nothing to lose if you try it! So edit your apache2.conf file and adjust your actual settings to match the ones bellow (these are good settings in terms of web server security as well).
TraceEnable Off
ServerSignature Off
ServerTokens Prod
FileETag None
HostnameLookups Off # this is important since your apache server won't try to translate your ip address into a dns name or host when you access your website
ExtendedStatus On # you can enable it afterwards, if you need it
Timeout 10
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
You could also disable apache modules (modules that you do not need or use). By default apache loads a big list of modules and I am pretty sure that you won't be needing them all. I can't provide you a list with what to keep enabled or what to disable but you can do a little Google research and based on your website you could decide what to disable and what to keep.
I am actually using all these settings on my CentOS 6.8 linux box and all the settings are in httpd.conf. On Debian you should edit /etc/apache2/apache2.conf and maybe some other files!

What is the difference between configuring SSL in nginx.conf or in sites-enabled? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I configured SSL in my nginx.conf. I'm getting a valid certificate on https://www.mydomain.com however, this shows a 404 as my website is at mydomain.com
Exploring, I see my site inside of available-sites which has a server block with a root and index but not listen block.
What is the difference between these two?
You can place your SSL configuration into either file. If you check the bottom of nginx.conf you will see
include /etc/nginx/sites-enabled/*;
Which simply includes the contents of all config files in sites-enabled into nginx.conf and continues parsing.

Special configuration of the vhost [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I've got some headache trying to configure that for some days so I hope someone can help me.
I've got few sites, each one related to an FTP account. I would like to make them accessible through my man website by the url http://www.mainsite.com/site1. At this point an Alias should do the work.
However I would like to add some features such as specify the log file related to the site1 which would be in the web directory of the FTP account site1. Later, I would like to put them in /var/log and have a script to sync the log file located in the web directory with the one in /var/log so that even if a user delete the log file in the web directory, the original one is still here.
To go back to the main problem, I don't know how to do that, I tried to configure a whole vhost for the site1 but then, as the ServerName would be the same as the main site, the main site would no longer be accessible.
Any suggestions ?
You could try the ancient ServerPath directive, which will cause /site1 to be mapped to one vhost and /site2 to be mapped to another, despite having matching servername and local interface:port.

Access new web site via browser with IP address? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Ive set up a new site with WHM but havent got the DNS set up yet. I want to be able to access the site via a browser so I can set up a CMS. Usually, I can just do this by entering the IP address into the browser, but this time I just get a page saying that Apache is working on the server.
Does anyone know a way round this?
Thanks!
The problem is that the request your browser is sending doesn't include the correct Host: in the HTTP header, so the web server replies with the a default catch-all page.
You can either
setup a private (local) authoritative DNS server with a yoursite.com zone, and set your system's DNS to point to this DNS server, or
temporarily trick the DNS resolution in your local system by registering whatever.yoursite.com with it's corresponding IP address in /etc/hosts file (in unix-like systems). There's an equivalent file in MS Windows systems, look for a file named hosts in C:\Windows\system32\drivers\etc.
I'd try with the latter first, as it's just a matter of adding a single line to a text file:
203.0.113.22 whatever.yoursite.com
You may need to restart your browser.

Using GoDaddy Domain Hosting to link to Amazon S3 Website [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
So I have some domains hosted at GoDaddy.com. I am trying to avoid to pay for a hosting service, except for using a static Amazon S3 page (as I don't expect much traffic at all for these sites). I have had some success, but not sure if this is a poor solution...
What I did for domain.com:
Set up permanent forwarding on GoDaddy to www.domain.com
Remove all DNS except for the A address to the GoDaddy IP, and a CNAME of www to the Amazon S3 site
It works as planned if someone types in www.domain.com. It seems to work alright for domain.com, too. However, it seems to do a 302 redirect instead of 301 even when I tell GoDaddy to have it be a permanent forward. I can ultimately goto Google Webmaster tools and say that I want it to use www.domain.com. However, that seems a little excessive.
Any suggestions on how to make this solution work better?
Possibly by changing some of the DNS settings or some other GoDaddy options that I don't know about?
You must name your S3 bucket the same as your domain, "www.example.com" Make sure you include the "www." subdomain prefix as part of the bucket name.
Set up your bucket as a web site per Amazon's instructions!. Make sure you have an "index.htm" file name entered and the correct bucket policy setup under Permissions.
Under Godaddy DNS settings make just one entry, set Host WWW CNAME, points to, "s3-website-us-east-1.amazonaws.com" or whatever s3 domain Amazon supplies for your bucket. You leave off the "http://www.example.com." heading in the url that Amazon supplies.
The last step under Forwarding/manage is to "forward only" your naked domain name "example.com" to "www.example.com"
If you did it right your browser will display your site as "www.example.com" whether you entered the www or not when you entered the url.
NOTE: You could just Forward to your bucket using the complete bucket url with "name masking", however most web crawlers will not see your complete site if you do it that way and web searches will fail.
Be sure to wait at least 30 minutes before testing your changes and by all means clear your cache in your browser or it will use the old address that it remembers from the past.
The DNS-apex-requires-an-A-record problem is definitely not well solved.
I can't personally vouch for them, but www.wwwizer.com hosts a free redirect service.