Re: portable server - putting all config files on a USB drive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 2, 2010 at 12:18 PM, Nigel Dodd <nigeldodd@xxxxxxxxxxxxxx> wrote:
> I am trying to build a linux, apache, mysql, php server that I can easily
> move from machine to machine.
> I am assessing the feasibility of putting all the configuration files, the
> virtual server defining files (those in sites-enabled etc), the website
> files (normally found in /var/www/....) on a removable disk. In addition to
> those are the mysql database files and config files and the php files but
> those aren't the concern of this group.
> My understanding is that apache2 is compiled to expect to find its main
> config file in /etc/apache2/apache2.conf but that in that file I can change
> the lines
>  ServerRoot "/etc/apache2"
>  .
>  Include /etc/apache2/conf.d/
>  .
>  Include /etc/apache2/sites-enabled/
> to point to a different location i.e. the usb disk.
> I think I will leave
> LockFile /var/lock/apache2/accept.lock
> alone.
> Inside all the virtual server files such as
> /usbdisk/etc/apache2/sites-enabled/mysite
> I need to change the
> DocumentRoot /var/www/mysite
> lines to /usbdisk/var/www/mysite
> My concern is that I am missing something or that this is a silly idea. I
> can't find any information about making a portable server and this adds to
> my concerns.

you can pass apachectl the -d parm to specify a server root before
reading the conf file, overriding the compiled-in default.

I suggest replacing all the hardcoded paths in your httpd.conf with a
${APACHE_USBROOT} and invoking apachectl with a wrapper that discovers
it's own filesystem location and sets APACHE_USBROOT and adds -d on
the real apachectl invocation.


You'll also need to teach your apachectl or envvars script to setup
the shared library path to include your APACHE_USBROOT/lib/ directory.

--

Eric Covener
covener@xxxxxxxxx

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux