How To Setup Apache behind nginx [closed] - apache

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 9 years ago.
Improve this question
I want to run Apache behind nginx. because, i want to use (.htaccess) Rewrite rules.
Currently Apache is running on port 80 with nginx running on port 8080. nginx to serve only static files (jpg,png,css,js...) rest of the things to handle by Apache.
Which apache mod? mod_rpaf or mod_proxy
Apache & nginx configuration?

You've got some things backwards. If Nginx is in "front", it should be on port 80, not Apache. Also, the proxying is done by Nginx. Apache needs no proxy module installed in this configuration.
Nginx also has it's own rewrite module, and recommends against using .htaccess files.
There are lots of tutorials already out there when searching for [using nginx as a reverse proxy for Apache]. I recommend checking one for details.

Related

DNS Records for HTTPS? NSONE, Namecheap, Hostmonster [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
sorry for the noob question.
Basically I have domains through Namecheap and my hosting is at Hostmonster.
I'd like to use the NSONE free DNS service. For a domain with http, I've already pointed the Namecheap nameservers to NSONE, and from NSONE pointing to the IP address of my hosting.
However I'm wondering whether its the same procedure for a domain I have which has a SSL certificate (https)?
I hope you understand my noob question.
Thank You!
There is no such thing as a DNS record for HTTPS. A DNS record cares (among other things) about the mapping between the domain name and the IP address, and http://example.com and https://example.com are the same name and therefore have the same IP address. This means no changes need or can be done at the nameserver which are specific to https.

Setup Lets Encrypt on VPS where the DNS is setup on CloudFlare [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 hosted a website using VPS and pointed to it using DNS services of CloudFlare, The site is working properly. Now I am trying to install ssl provided by Lets Encrypt, I am able to complete the steps successfully but the site doesn't appear to be ssl enabled. Also when I completed the steps succesfully the process didn't generate any cert file.I have used the https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-14-04 could anybody tell me were I might be going wrong.
CloudFlare supports using Let's Encrypt between CloudFlare and your origin; however you must use the --webroot argument when you run the Let's Encrypt binary.
By using the webroot authentication method, a temporary file is placed to validate your domain for the certificate. There is a guide on how to do this on the CloudFlare help centre: How to Validate a Let’s Encrypt Certificate on a Site Already Active on CloudFlare
By using this method, you are able to ensure the connection between CloudFlare and your origin web server is fully encrypted using Strict SSL.
Now you have https on your server.
So the communication vpc-cloudfare can use https.
Now you have to configure cloudfare to use https betwenn cloudfare and the browsers.
See https://www.cloudflare.com/ssl/

Block CNAME redirect from a domain I don't own [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
Someone has registered a domain and is using a CNAME redirect to direct traffic to my site. Google is seeing this as duplicate content and it's affecting my rankings.
Is there anyway of blocking access for traffic that comes to my site through the domainnotundermycontrol.com redirect?
Thanks in advance.
"There is no BAD publicity."
The CNAME is solely a DNS tool. The request to you server should still be sending a request for the domainnotundermycontrol.com/somepage to your apache server once it gets you're IP from the DNS lookup. Apache will see the 'ServerName' as domainnotundermycontrol.com
It sounds like the domain which you CAN control has no filtering on server name, only ip, maybe. Create a vhost for the domainnotundermycontrol.com on your server to catch all requests to that server name and serve up an index file with links to legitimate page you want people to hit or just some adwords. Then it will no longer be caught by your other vhost.
Enjoy the free traffic.

Apache and Tomcat run on the same server [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
I have currently Apache running on port 80, it has lots of domains setup. I need to install Tomcat 7 and run it also on port 80. I know how to configure it but how do I make my old Apache and Tomcat run on the same port 80 ?
You can set it up by assigning a secondary ip address to your network card. Either google the procedure or get in touch with your system admin (Windows or Unix) for assistance. Once you have the secondary ip address configured, you can setup the second instance of apache to listen to it on port 80. For your convenience you can also have a DNS entry setup for that ip addresss, so that you can access it using a name vs ip address.

Can you configure mod_proxy as a reverse proxy cache? [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 9 years ago.
Improve this question
I can configure mod_proxy to be a forward proxy cache and I can configure it to be a reverse proxy. Is there any way to configure it to be a reverse proxy cache? I haven't had any luck with that yet.
Using mod_proxy, Apache can function either as a forward proxy or a reverse proxy. It does not function as a cache unless you specifically enable mod_cache too. Once mod_cache is enabled, it should transparently handle caching of proxied content too. The module is labeled experimental.
See the mod_cache doc page for additional details.
You can do what you ask (see for example Roshan's answer), but I would also suggest that you look at a dedicated reverse HTTP proxy: Varnish.
Varnish is very efficient, much more so than Apache.