LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 12-11-2004, 10:59 AM   #1
yotamk
Member
 
Registered: Nov 2004
Location: ~
Distribution: Debian
Posts: 145

Rep: Reputation: 15
Apache, ftp and virtual directories


Hi all,

using Debian, Sarge. Apache 1.3. The server is only for debug purposes, i.e. to check my PHP scripts

have two questions:
1) Should I have all my web files under /var/www/ ? If not, how do I define virtual paths to directories situated elsewhere?

2) Currently I'm using root mode to move files to /var/www/... How can I use FTP to do the same?

Sorry if these questions are silly....
Thanks.
 
Old 12-11-2004, 11:22 AM   #2
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
Not sure whether this is what you asked, but I have apache 2.0.52 running here with these features doign well:

1. You can have dirs elsewhere, just link them into /var/www/. Apache will follow symlinks.

2. you can use sftp or fish with konqueror to move files.
 
Old 12-11-2004, 03:15 PM   #3
yotamk
Member
 
Registered: Nov 2004
Location: ~
Distribution: Debian
Posts: 145

Original Poster
Rep: Reputation: 15
The thing is I'm trying to connect via ftp with no success.
What is the ftp address?
Tried ftp://localhost ; ftp://myusername:mypassword@localhost, with no luck. Also used 127.0.0.1 instead of localhost - obviously it didn't work either...

Should Apache be re-configured for ftp?
 
Old 12-13-2004, 06:16 AM   #4
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
ftp://localhost should have done it right. I guess neither apache nor any other program is listening on port 21. Maybe you need to install proftpd.

If you are doing this in the same machine, just use root to move files, its better than installing another source of vulnerability.

Try this at konqueror (kde user?):

fish://root:rootpasswd@localhost

or

sftp://root:rootpasswd@localhost
 
Old 12-13-2004, 07:57 AM   #5
yotamk
Member
 
Registered: Nov 2004
Location: ~
Distribution: Debian
Posts: 145

Original Poster
Rep: Reputation: 15
Using Gnome

Moving files in root mode isn't very convenient

If I'll have a symlink to my /home/user/website, will it save me the job of copying files to /var/www. i.e if I make changes to a php file which is located in /home/user/website, will the change be shawn when I browse to localhost/"symlink_to_website" ?
 
Old 12-13-2004, 08:05 AM   #6
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
Good point. I didnīt see this. Well, I guess it will load the new php file, as requested.
I use to have index.html in /var/www/apache2-default/, so, even when I change other symlinked files, I have to log as root if I edit index.html. But I never tried to symlink index.html itself. Did you?
 
Old 12-13-2004, 08:25 AM   #7
yotamk
Member
 
Registered: Nov 2004
Location: ~
Distribution: Debian
Posts: 145

Original Poster
Rep: Reputation: 15
Will try it soon, thanks.

Do you think having symlinks that way, might compromise security?
 
Old 12-13-2004, 02:41 PM   #8
yotamk
Member
 
Registered: Nov 2004
Location: ~
Distribution: Debian
Posts: 145

Original Poster
Rep: Reputation: 15
Created a symbolic link to my website directory in /home... And it works
I think it's better to have a symlink to a directory (the server will load index.html by default...), don't you?

Changes to files are immediately shown.
This is a great solution for debugging server scripts without having to upload them on each change.

But does this compromise security?

Thanks bruno buys.

Last edited by yotamk; 12-13-2004 at 02:47 PM.
 
Old 12-13-2004, 04:41 PM   #9
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
Glad to know. Maybe I'll use this solution, also. Kinda used to transfer files as root...
I don't see how it can compromise security at a first sight... But I'll check further. I'm no sec guru.
Thank you!
 
  


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
FTP virtual users with different home directories remi Linux - Software 14 07-27-2009 11:20 AM
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 02:37 PM
Windows XP/NTFS + Virtual PC/Mandrake + Samba = Shared Directories? IamI Mandriva 1 12-18-2004 06:06 PM
Apache Virtual Hosting and FTP Station51 Linux - Networking 3 11-25-2002 06:23 PM


All times are GMT -5. The time now is 11:29 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration