Can you configure mod_proxy as a reverse proxy cache? [closed] - apache

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.

Related

How To Setup Apache behind nginx [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 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.

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.

Does nginx proxy handle well on SEESSION ID? [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 11 years ago.
Improve this question
For example,
I have a nginx server as a front-end and two apache servers with mod_php.
As you know, php has sesssion support, which set a cookie identifying the SESSION ID but the real data is stored at the server.
When a user is set with this kind of cookie by one apache server, will his other HTTP requests be fowarded to the same apache server before the session/cookie expires ?
Out of the box, no, the requests will not necessarily be forwarded to the same server, so your application using sessions will be broken.
Go to your favorite search engine and type "nginx affinity" and "nginx sticky" for solutions.
Yes, it will do that if you follow the documentation for multiple back-end servers usage:
http://wiki.nginx.org/HttpUpstreamModule
But better consider storing sessions in a some sort of shared storage, e.g. Memcached or a database.

Rewriting Amazon S3 static urls [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
In the interest of hosting purely static sites from Amazon S3, is the only route to rewrite the URLs and endpoints for accessing it's resources in a friendlier way via a rewrite engine such as any web server? And would it best to host this as an EC2?
It seems overkill but wasn't sure if there were alternatives.
I'm not sure why you need to rewrite.
You can assign a DNS CNAME to an S3 bucket for DNS. And they recently started supporting a default document.
So you can perfectly host http://www.example.com/ or http://www.example.com/some/path/to/some/file.html
http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html
S3 offers no features to 'rewrite' URLs as keys are immutable.
If you want to use URLs that are different from the S3 key you'll have to proxy the requests yourself.