Is there any experienced Nginx driver? I want to make a repost, please give me some advice.
过去多啦不再A梦
过去多啦不再A梦 2017-05-16 17:10:49
0
1
370

I want to forward it, that is, forward www.domainn.com:8080 to www.domain.com/API

Can it be done? Please provide a configuration example, thank you very much! :)


【Resolved】

Add to the configuration file:

location /api {

        proxy_pass http://192.168.0.1:8080/;

    }
过去多啦不再A梦
过去多啦不再A梦

reply all(1)
滿天的星座

Official Documents


server {
    listen    8080;
    server_name    www.domainn.com;

    location /{
      proxy_pass http://www.domainn.com/api/;
    }
}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!