0

Since there are no drive letters in Ubuntu, where do you put a document you want as link on your Apache website on Ubuntu?

For example, you install Apache2 on Ubuntu Server, you go to /var/www/html/index.html to create your website. On your website you have an option for Contacts and About us which you want to be clickable. Where do you put the document to link to this option?

Zanna
  • 70,465

1 Answers1

3

Your title is mileading, I don't see any relation to drive letters. Apache will find files relative to the Directory of your site. Local links will only work on your machine, but then you won't need Apache.

Put your files to your Apache site directory:

/var/www/html/index.html
/var/www/html/contact.html
/var/www/html/about_us.html
/var/www/html/img/image1.jpg
/var/www/html/img/image2.jpg

And then link or embed them in your html page:

<a href="contact.html">Contact</a>
<a href="about_us.html">About us</a>
<a href="img/image1.jpg">Link to image 1</a>
<img src="img/image2.jpg" alt="Embedded Image 2" />
pLumo
  • 26,947
  • thanks @Rovo. Please if it is a picture then it should be .jpg or .img right? – sydborn Nov 08 '17 at 11:46
  • .img does not exist as standard image file. JPG, PNG, GIF are common formats for websites. – pLumo Nov 08 '17 at 11:50
  • Thanks,How will you approach this if it were to be a form?assuming you have php installed?how will you make the form responsive? – sydborn Nov 09 '17 at 00:25
  • Please read some tutorials on web development. This platform is not meant to be seen as an online tutor. If you have a specific problem you can come back and ask a new question. – pLumo Nov 09 '17 at 12:28