LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 05-27-2007, 11:18 PM   #1
Broady
LQ Newbie
 
Registered: May 2007
Location: Australia
Distribution: Fedora 6
Posts: 8

Rep: Reputation: 0
Display home page help


Hi all,
Now this is a real newbie question. I have built a Fedora 6 LAMP Server and at this stage I only want to host one website.

To build and install the server I followed Stanton-Finleys' guide:
http://stanton-finley.net/fedora_cor...ion_notes.html

I am having trouble adding my home page to the server to overwrite the original "Fedora Core Test Page".
The reasons are:
I have two accounts.
1. The main Admin user which I use to login to Fedora with to manage the server.
2. A user called "jason" which I created which I though would be the developer for the machine.

My questions are:
1. If I create a file named "test.html" in gedit, where do I save the file?
When following Stanton-Finleys' guide I created a "public_html" folder and ammeded the Apache config files so that pages could be served from the "public_html" directories.
If I access http://localhost/ I am shown the "Fedora Test Page". If i access http://localhost/~jason/ I am shown the index.html file I created.
Do I save the file in the directory: "var/www/html" or "public_html"

2. What user account should I be logged into to crete the "index.html" file (The main su user, the normal admin user, or the user "jason"? Does it matter?

3. I have followed the guide and setup vsFTP. This is why I created the user account "jason" I thought I needed this to be able to login using the ftp program.
If I login using the user account "jason" I login to the root of the "jason" account. (I think). From here I can navigate to "public_html" and upload the "index.html" file.
If I login using the main username which I use to login to Fedora I also end up at the root. I am not sure from here how to navigate to the "var/www/html" folder.
I also have a "public_html" folder listed in the root. If I try and upload to this folder it fails.

Should I just delete all "public_html" folders and just serve the pages from "var/www/html"? I so what account would I need to login with to upload the files?

Can someone please put mew out of my misery and explain what I am doing wrong?
Any help or advise is greatly apprciated
Thanks
Jason

Last edited by Broady; 05-27-2007 at 11:20 PM.
 
Old 05-28-2007, 02:20 AM   #2
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Quote:
1. If I create a file named "test.html" in gedit, where do I save the file?
When following Stanton-Finleys' guide I created a "public_html" folder and ammeded the Apache config files so that pages could be served from the "public_html" directories.
If I access http://localhost/ I am shown the "Fedora Test Page". If i access http://localhost/~jason/ I am shown the index.html file I created.
Do I save the file in the directory: "var/www/html" or "public_html"
public_html is used for users in your system to serve out pages via your apache web server. If you just do "http://localhost", the index.html file is read from the document root of apache. Look for "DocumentRoot" in your apache config and that's where you need to put your files in. So, it looks like "/var/www/html" is your documentroot so place the files there.

Quote:
2. What user account should I be logged into to crete the "index.html" file (The main su user, the normal admin user, or the user "jason"? Does it matter?
Well, what username is running your apache process? You should create files using that user. However, you can be root and create the files as well as long as the permissions are correct.
Quote:
3. I have followed the guide and setup vsFTP. This is why I created the user account "jason" I thought I needed this to be able to login using the ftp program.
If I login using the user account "jason" I login to the root of the "jason" account. (I think). From here I can navigate to "public_html" and upload the "index.html" file.
If I login using the main username which I use to login to Fedora I also end up at the root. I am not sure from here how to navigate to the "var/www/html" folder.
I also have a "public_html" folder listed in the root. If I try and upload to this folder it fails.

Should I just delete all "public_html" folders and just serve the pages from "var/www/html"? I so what account would I need to login with to upload the files?
Yes, if you log in via ftp, you will land in your home directory. It's really up to you if you want users to serve their own web stuff or if you just want it all in /var/www/html. I don't suggest you log in on any protocol using the root account. However, if you log in as root on ftp, you will land in /root. To navigate to /var/www/html, go up a directory (now you'll be in '/')and then you'll see /var. Root is equivalent to 'administrator' account on windows. On windows, you log in with your username but not with administrator, right? Same thing.

-twantrd

Last edited by twantrd; 05-28-2007 at 02:22 AM.
 
Old 05-28-2007, 11:09 AM   #3
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Thumbs up

Good advice, nicely structured, good use of "Quote" blocks.
 
Old 05-28-2007, 05:59 PM   #4
Broady
LQ Newbie
 
Registered: May 2007
Location: Australia
Distribution: Fedora 6
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks a million twantrd,
Your explanation is very clear and easy to understand.
After experimenting yesterday with the index.html file, the only way I could get it to display under http://localhost/ was to place it in the "var/www/html" dir.

As per the FTP, are you saying I should not login using FTP as the root user? Should I log in as the "jason" account to upload the files?

If I do ftp as the user "jason" or as the "Administrator" I found that I cannot go up a level.
I end up here: "/"
I presume this is the root. I am seeing folders like: "beagle, config, eggcups, evolution ect" I don't see a "var" folder.
Is this a permission issue bound to these user accounts? or are there settings I need to change in the "vsftp.conf" file?

Once again, thankyou for your time and help.

Last edited by Broady; 05-28-2007 at 06:09 PM.
 
Old 05-29-2007, 04:02 AM   #5
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Quote:
As per the FTP, are you saying I should not login using FTP as the root user? Should I log in as the "jason" account to upload the files?
Yes, don't log in as user root. Instead make an account (or put an existing account in a group) and give it proper permissions to modify files/directories.

Quote:
If I do ftp as the user "jason" or as the "Administrator" I found that I cannot go up a level.
I end up here: "/"
I presume this is the root. I am seeing folders like: "beagle, config, eggcups, evolution ect" I don't see a "var" folder.
So, you don't see /var eh? Do those directories exist in the home directory of "jason"? You might have chrooted your users in vsftpd. What this means is that when a user logs in via FTP, they will land in their home directory and cannot go back out a directory. To them, it will look like "/" but in reality, it's /home/<username> or whatever home dir you set it to be.


To achieve what you are trying to do, I would take user "jason" out of a chrooted environment in vsftpd. I would then place user "jason" in the same group that runs the apache process so that you can upload to that directory and modify files.


-twantrd
 
  


Reply


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
Where is Yoper's Home page? trobins2005 Yoper 8 08-05-2005 09:21 AM
lost start page (home page?) multiplaone Linux - Newbie 1 05-29-2005 07:10 PM
Legends Home page gcclinux Linux - Games 3 12-03-2004 12:10 PM
konqueror home page ronss Linux - Distributions 0 05-20-2004 08:24 AM
yahoo home page sfcror Linux - Software 0 10-07-2003 08:07 PM


All times are GMT -5. The time now is 10:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration