LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-25-2021, 02:02 AM   #1
TBotNik
Member
 
Registered: May 2016
Location: Greenville, TX
Distribution: Kubuntu 18.04
Posts: 796

Rep: Reputation: Disabled
Question


All,

I think I finally figured this out, but really only want opinions at this point. I wrote several threads trying to address this and now think I've got it. A couple of the threads I posted are:

linuxquestions.org/questions/linux-software-2/apache-alias-help-4175681489/

linuxquestions.org/questions/linux-software-2/apache-not-sure-4175689230/

Anyway searching through all the Apache docs there is nothing these about using and hosting off a secondary drive. Since the IISC announced in 2014 that any hosting out of the "/var/www/" directory is not legal or secure and that all hosting should be on the secondary drive, my threads were attempts to get this working.

Apache said they would add this capability, but did not or their docs would be talking about it.

Anyway here is what I figured out that should work, though the security will not be as tight as it should be:

Steps:
1.) Give the secondary drive a fixed mount point in fstab!

fstab entry:

Code:
/dev/sdb1       /3T             ext4      defaults          0      1
2.) Set default directory:
Code:
/3T/Projects/www  or whatever you decide this is mine!
All hosting must be in that default directory!

3.) Declare the VHost dirs in "/var/www" and copy config files per Apache docs,

4.) Use symlinks to link the VHost dirs to the Project directories actually containing the code!

Now this is where I need your opinions! Do y'all think this is right and will work?

I'll be trying this in the next few days, but always value my friends and gurus input!

Cheers!

TBNK

Last edited by TBotNik; 11-25-2021 at 02:06 AM.
 
Old 11-26-2021, 12:08 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by TBotNik View Post
Anyway searching through all the Apache docs there is nothing these about using and hosting off a secondary drive.
The proper way to use a secondaru drive under GNU/Linux is to mount it into an existing filesystem. Since this happens on a filesystem level and is completely opaque to the software using it, there's no need to address this in Apache docs specifically.
Quote:
Originally Posted by TBotNik View Post
Since the IISC announced in 2014 that any hosting out of the "/var/www/" directory is not legal
Oh, that horse manure again!
FWIW, you're wrong. There's no IISC, and it certainly doesn't tell you what is legal on you very own Linux installation.

The rest of your post: Yes, do that. There's nothing wrong with it.
__________

I would also like to point out that TBotNik is most likely not only lying to us, but also to unsuspecting customers. Keep that in mind when you attempt to help with their server problems. Also see here.
 
Old 11-26-2021, 08:46 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,715
Blog Entries: 4

Rep: Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951
If your Linux has LVM = Logical Volume Management installed, as these days it probably does, then you don't have to worry anymore about "individual devices." Instead, you add the devices to a "storage pool" and then carve "logical volumes" (mount points ...) out of those. All of the devices in the pool contribute storage to it. Provision has also been made for automatically moving everything off a particular drive if it begins to make ominous clicking noises.
 
Old 11-26-2021, 09:03 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,839

Rep: Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972
As far as I know you can set documentroot to anywhere and vhosts must be under documentroot.

Therefore if I understood your post declaring vhosts as /var/www in apache conf files and symlinking to your new documentroot would not satisfy that requirement.
 
Old 12-01-2021, 02:35 AM   #5
TBotNik
Member
 
Registered: May 2016
Location: Greenville, TX
Distribution: Kubuntu 18.04
Posts: 796

Original Poster
Rep: Reputation: Disabled
All,

Thanks for the input!

sundialsvcs,

Do you have links to info on the "storage pool" you mentioned. Would like to study that!

Cheers!

TBNK
 
Old 12-01-2021, 07:43 PM   #6
GentleThotSeaMonkey
Member
 
Registered: Dec 2016
Posts: 338
Blog Entries: 4

Rep: Reputation: 128Reputation: 128
https://opensource.com/article/18/11/manage-storage-lvm (from ddGoo of: "storage pool" intitle:lvm )
 
Old 12-02-2021, 10:17 AM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,715
Blog Entries: 4

Rep: Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951Reputation: 3951
Thanks for that, SeaMonkey. That's a very good article.
 
  


Reply

Tags
apache, drive, secondary, vhosts


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 newbie question.. (very newbie question) tarballed Linux - Newbie 1 02-07-2003 08:41 PM
RE: Suse 8.0 hardware question {newbie question, pls help} Radiouk Linux - Distributions 2 06-04-2002 12:53 PM
RE: Samba question pls help {Newbie question} Radiouk Linux - Networking 4 06-03-2002 06:40 PM
Security question {newbie question} Radio Linux - Security 3 05-17-2002 06:32 PM
Lilo/kernel question & font question phek Linux - General 9 09-18-2001 12:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:46 PM.

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