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.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have a site on AWS with an SSL. The site is an ec2 instance and runs WordPress.
I wanted to move the site out of Wordpress, so I have a different ec2 instance with the new site.
The domain will remain the same and I want to minimize downtime during the switchover. Can I get a new SSL for the new site before the domain DNS points there? I know the connection won't show it's secure until the SSL it matches the domain.
Is there another way to handle the migration?
If the domain isn't changing then as far as SSL is concerned neither is your site. You just need to properly configure the new site to use the same SSL certificate. To minimize downtime move the AWS Elastic IP to the new ec2 instance during migration. If done correctly you'll have no downtime at all.
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.
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.
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.
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.