By RvSingh013
I have setup Angular8 project under nginx reverse proxy but I want to redirect all URL request on https except one URL(LIKE /PLAYER work on http) how can I handle this redirection with Nginx vhost.
Thanks & Regards, Ravinderpal Singh
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!
Hi @RvSingh013,
The following server block should do the trick for you:
location / {
rewrite ^/(.*)$ http://www.Domain.here/$1 permanent;
}
location /123456.txt {
root /path/to/webroot;
}
Please note you’ll need to change the destination on the first location and the URL and root path for the second location for this to work.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.