hi everyone , on my vps , i have a v2ray panel on sub1.mydomain.com:8880 and a panel on sub1.mydomain.com:8081 , now i need to create a subscribe file for my v2ray users and share it, so everyone can download this file from my vps , for example when someone goes to :
mydomain.com/sub/sub1.txt or sub1.mydomain.com/sub/sub1.txt
they manage to open or download this file from my vps . how can i do it ?
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!
Heya @driftinglightcyanurchin,
So after you are using v2ray, I would assume you are using Nginx as a reverse proxy. In that case in your Nginx configuration for your both mydomain.com and sub1.mydomain.com you can add the following Nginx block:
location /sub/ {
alias /var/www/sub/;
autoindex off;
try_files $uri =404;
add_header Content-Disposition "attachment; filename=$1";
}
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.