Search code examples
nginxwsdl

How can you serve locally stored wsdl file from nginx


I am trying to workout a solution which let's us serve a wsdl file stored locally from our nginx web server. The WSDL is accessed from the browser with URL in the format:

https://*******/nameofthewsdl?wsdl

I am trying to place a block in my vhost conf file like this:

 location ~ /******** {
        root /etc/nginx/docs/;
        include /etc/nginx/mime.types;

Have placed the wsdl file under the location /etc/nginx/docs but it always give 404. Not sure how to progress this.


Solution

  • Serving static XML files via NGINX is not a big deal. Given all your wsdl-files are having the file ending wsdl this configuration should work.

    
    location ~* \.(wsdl)$ {
       root /etc/nginx/docs/;
       default_type application/xml;
    }