Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
return 301 $scheme://domain2.com/$request_uri;
or
return 301 $scheme://domain2.com$request_uri;
?
if we want to serve website with subdomain www, we need to configure CNAME record, which is alias of A record, pointing a subdomain to an A record in our DNS. So CNAME should look like this:
www @
Hi, my website was maliciously attacked, and has had several pages indexed in google as ?PID= extensions.
Is there a term that I could use to redirect every page that has a ‘?/PID=’ at the end of it?
@dillon: Can you post an example URL? You can configure nginx to return a 404 error on every URL that contains ?/PID.
i used below script to strip off www and redirect www.domain.com to domain.com for SEO purposes. It works but is it bad practice (http://wiki.nginx.org/Pitfalls)? I use nginx as proxy to my Node.js server where the site is.
server { server_name www.domain.com; rewrite ^(.*) http://domain.com$1 permanent; }
server { server_name domain.com; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection ‘upgrade’; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }
Hey i am using the nginx settings as mentioned above for 301 redirect from domain.in to domain.com.
This is causing a redirect loop when i open domain.in.
Hi there
I’ve gone through this tutorial but when I try to restart nginx, it return fails.
My problem: Currently, my site is having the following url for a post http://bosslee.co/2014/09/03/singapore-the-land-for-ecommerce-startup/ The permalink setting in wordpress is http://bosslee.co/%year%/%monthnum%/�y%/%postname%/
But I’m looking to change it to the following. http://bosslee.co/posts/singapore-the-land-for-ecommerce-startup/ where posts is a category The permalink setting in wordpress is http://bosslee.co/�tegory%/%postname%/
**This is what I tried to do Adding the following ** rewrite ^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$ http://bosslee.co/posts/$4 redirect to the server block
What am I doing wrong here? I need to do the redirect because the links the google index are all pointing to the old permalink. Looking forward to learn more on this.
New to server but learning lots from this forum.
Bryan
Some of the resources I tried using:
I’m running Nginx and gave it a try but the way I implemented your example, it is redirecting all traffic from my domain to the new URL I’ve specified. What I’m trying to accomplish is only redirecting a subdomain, not the entire domain. Specially, I am trying to redirect www.domain.com to my Facebook page until I get the Wordpress site up and running. However, I don’t want wp.domain.com redirecting also. My plan was, once I’ve finished building my site at wp.domain.com I would just rename it to www and turn off the redirect. I hope I’m being clear.
Maybe a similar question: I’d also like to redirect my WP admin page too to make it shorter. Instead of www.domain.com/wp-admin I’d like to just be able to go to admin.domain.com and have it redirect.
Thanks in advance.
now since I’ve never touched nginx I need to find the configuration file. Would have been a handy extra bit of data, where to put the server block.