LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-17-2014, 10:39 PM   #1
L.Jones
LQ Newbie
 
Registered: Dec 2013
Posts: 7

Rep: Reputation: Disabled
Using Apache on Linux


I'm doing a bit of web development and I've recently switched from Windows 7 to Linux Mint.

On my Windows computer I would store the websites that I was working on in the htdocs/myfiles folder. It would seem that the Linux equivalent is the var/www folder. However, I am finding that all I can do there is edit the current html.index file and I am unable to store multiple website in this location as I had previously done in the htdocs/myfiles folder.

I've tried chmod but it hasn't solved the problem.

...what am I doing wrong here?

Where do Linux web developers usually store files for variouse site they are working on?

Thanks!
 
Old 06-17-2014, 10:45 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,721

Rep: Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704
Hi,

can you not make a new directory ("folder" in winspeak) inside /var/www?

Evo2.
 
Old 06-18-2014, 05:21 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,344

Rep: Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746
I think you may find this useful https://httpd.apache.org/docs/curren...blic_html.html or create separate dirs inside /var/www/ as above (or both).

See also https://httpd.apache.org/docs/current/vhosts/

Last edited by chrism01; 06-18-2014 at 05:23 AM.
 
Old 06-19-2014, 09:44 AM   #4
L.Jones
LQ Newbie
 
Registered: Dec 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Evo2, after I changed the permissions I was able to create new directories in the www directory. However, I was not able to remove the existing html.index file and when I visit localhost all I see is the html.index file that I can not get rid of.

On my Windows computer I created a folder for each website that I was working on in the htdocs/myfiles folder and when I visited localhost I would see all of my folders (websites) listed there. I would like to recreate that setup on my linux machine.

I've been browsing YouTube looking for a videos on this topic, but all I get are video showing me how to install apache : (

chrism01, thanks for the links. The virtual hosting link looks like it might be a solution, but I was hoping to just find the right directory to put my files in.

I would imagine that Linux developers also have more than one website they want to work on... where are these sites usually stored? Or do they usualy configue apache virtual hosting??
 
Old 06-20-2014, 05:47 AM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,721

Rep: Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704Reputation: 1704
Hi,

you should be able to get rid of that file. Eg to permanently delete it

Code:
sudo rm /var/WWW/index.html

Evo2.
 
Old 06-20-2014, 03:36 PM   #6
L.Jones
LQ Newbie
 
Registered: Dec 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Evo2 that was it!

I tried to remove it before but clearly I was doing something wrong ; )

Thanks for the help.
 
  


Reply

Tags
apache2


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
Apache close wait error :Apache stop responding,Server get hangs jsaravana87 Linux - Server 1 06-19-2012 11:49 AM
setting up apache from scratch on a linux machine, apache failed message upon bootup dramous43 Linux - Enterprise 2 01-26-2010 07:53 AM
Apache Webserver on Slackware - Failed to Start Apache - 'no listening sockets .." CCTVGuru Linux - Server 4 10-11-2009 01:14 AM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 10:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:46 AM.

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