0

I am developing a web based application that displays web page on client server based on a xml file from the web server that is configured with httpd. I am new to httpd and need guidance on how to code HTML page that reads xml file from web server with httpd, how to code the file path in HTML and how to call the httpd to access the file with HTML.

Vikram Mohan
  • 39
  • 3
  • 15

1 Answers1

0

What you want is to map a URI to a filesystem location.

Assume your hostname is example.com and your have a file foo.xml, here is what you need to do:

  1. Put foo.xml in server's directory, say /var/www/xmls
  2. Edit httpd.conf, set DocumentRoot /var/www
  3. Create index.html in /var/www
  4. In index.html add link http://example.com/xmls/foo.xml
  5. start httpd service

Now if you open http://example.com, you will see your index.html page. If you click the link you just added you should be able to download/view foo.xml.

Note: the runner of httpd must have r+x permissions on www and xml directories.