Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-22-2008, 12:47 PM   #1
LQ Newbie
Registered: Dec 2008
Posts: 2

Rep: Reputation: 0
does files with .html extension work on linux server?

i have a website created with pages having .html extensions. i would like to host it on a linux server. do i need to rebuild the web site or can i directly upload it on to a linux server?

Old 12-22-2008, 01:37 PM   #2
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
if the site is entirely static HTML pages it will work perfectly well on a linux web server.
Old 12-22-2008, 02:15 PM   #3
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 404Reputation: 404Reputation: 404Reputation: 404Reputation: 404
Any web server will serve html. That's what they are designed for.

The extensions that it will serve and parse will only depend on how the web server is configured. 99.99% of the servers are configured to serve files with html/HTML extensions as html, and to use "index.html" or "index.php" as the default nowadays. No admin ever changes that unless it's doing a very odd thing with the server (and in that case s/he probably picked the incorrect tool, since the purpose of html servers is to serve html...).

Most servers will be able to serve additional mime and file types (txt, php, xml, svg...), it all depends on how it was compiled and configured.

In short, if your files are valid html you shouldn't need to change anything, regardless of the host OS.
Old 12-22-2008, 07:37 PM   #4
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,141

Rep: Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671Reputation: 2671
FYI, if you created those pages on an MS system, you'll have to run the dos2unix util over them after you've uploaded them. MS and Linux use different line-ending sequences.
Old 12-22-2008, 09:53 PM   #5
Registered: Jun 2007
Location: sydney
Distribution: redhat , ubuntu, centos
Posts: 56

Rep: Reputation: 16
if you already set "upload/download use ascii code" on your upload tools,you don't need to run dos2unix

Last edited by yzhong; 12-22-2008 at 10:01 PM.
Old 12-23-2008, 12:11 AM   #6
Registered: Feb 2006
Location: Colorado
Distribution: lubuntu, fedora, lightning Linux.
Posts: 180
Blog Entries: 1

Rep: Reputation: 36
Another thing to consider, is that ALL your links, and file references must be case sensitive. In a winblows server, they usually ignore case.
example of good html in Linux if the file linked is named Love_Song.mp3:
<a href="mp3s/Love_Song.mp3">A Love Song</a>
If the file were named 'love_song.mp3' it would not work in linux servers beit apache, lighttpd, or others.
Old 12-25-2008, 07:24 AM   #7
LQ Newbie
Registered: Dec 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Lot of thanks for the replays. it was of great help!

Old 12-26-2008, 01:27 AM   #8
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
Further, please remember that file names in Linux are case sensitive. If you have a link (URL) within a page, the link should have the same capitalisation as the physical linked file.

If the physical file is called MYNEXTPAGE.html, the URL in the originating page should be only MYNEXTPAGE.html and cannot be MyNextPage.html, MYNEXTPAGE.HTML or any other capitalisation.

So, it is advisable to check all links once.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
wget does not work because of no html files? ufmale Linux - Newbie 1 07-03-2008 12:45 AM
Search & Replace Technique to Fix html HREFs w/o html extension donv2 Linux - Newbie 1 01-31-2007 12:59 AM
converting a doc/ppt Windows files in html files under linux env agrosu Programming 7 02-23-2006 04:07 PM
apache server setup and how to place files in the var/www/html directory dramous Linux - Newbie 7 09-28-2004 05:18 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration