LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-02-2015, 11:48 PM   #1
jhLinux
LQ Newbie
 
Registered: Oct 2015
Posts: 5

Rep: Reputation: Disabled
Smile Creating a sandboxed Apache Server for a single PHP application


I hope I'm posting this in the right category, I wasn't sure if it should be software or servers, since its Apache software but I know it will be a bit of work on the Server as well.

So, long story short, I have a Web based PHP application that id like to distribute, and id like the preferred installation be the PHP application running on its own instance of Apache and PHP.

I want this for a few reasons...
  1. Support - If they use this "Package" I can support them 100%
  2. To make it easier for those who dont know how to work with Linux servers or how to install Apache/PHP, or how to manage them
  3. So that it will be in its own environment, not in same service with other "websites" or applications

I know a great deal of Linux (Mostly RHEL/CentOS), and I'm pretty well experienced with Apache and PHP (Both from the server side and development standpoints)

The question I have is basically... Whats the best way to go about doing this? Has anyone here tried it before? I couldn't find any decent tutorials online, so I thought id try here.

Thanks!
 
Old 10-03-2015, 05:11 PM   #2
Soderlund
Member
 
Registered: Aug 2012
Posts: 185

Rep: Reputation: 81
I don't know if it's the best way but you can chroot it (OpenBSD chroots Nginx by default) or run it in Xen.
 
Old 10-03-2015, 05:36 PM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by jhLinux View Post
I hope I'm posting this in the right category, I wasn't sure if it should be software or servers, since its Apache software but I know it will be a bit of work on the Server as well.

So, long story short, I have a Web based PHP application that id like to distribute, and id like the preferred installation be the PHP application running on its own instance of Apache and PHP.

I want this for a few reasons...
  1. Support - If they use this "Package" I can support them 100%
  2. To make it easier for those who dont know how to work with Linux servers or how to install Apache/PHP, or how to manage them
  3. So that it will be in its own environment, not in same service with other "websites" or applications
Sounds like a job for Docker! See my most recent blog post here about the particulars.

Have Fun!
 
Old 10-03-2015, 09:44 PM   #4
jhLinux
LQ Newbie
 
Registered: Oct 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
Sounds like a job for Docker! See my most recent blog post here about the particulars.

Have Fun!
I might support docker containers as well, but for those who dont use docker.. I want them to be able to do a simple "yum install $application", and have it install a sandboxed Apache or Nginx...

Please, guys, no alternatives, lol. This isnt something I plan on ONLY doing, its something I plan on supporting/supplying as well as things like Docker, Vagrant, Chef/Puppet Recipes, etc.

So I know I can just tear into the RPM file and see whats needed, I was just wondering if anyone has a better way of doing it.
 
Old 10-04-2015, 11:54 AM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
It fits all your requirements.
and can be "up and running" in 5 minutes.

and if you "might support" docker/vagrant/chef/puppet, your users won't know any of those either, so why not give it a try?
"yum install $application" is a repo command not an rpm install command. So your reasons for not trying it out
don't make any sense to me.
Your way seems like more work.

You could build your application in a custom container and publish it yourself.

BTW:
Code:
curl -sSL https://get.docker.com/ | sh
works on CentOS/Redhat/Fedora/*SUSE and Ubuntu flavored hosts.

You asked for ideas and then say "No alternatives".
This isn't Burger King.
The proper reply is "Thank you".

Good Luck.

Last edited by Habitual; 10-04-2015 at 11:57 AM.
 
Old 10-04-2015, 12:53 PM   #6
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
Hi

I don't think that these reasons...
Quote:
So, long story short, I have a Web based PHP application that id like to distribute, and id like the preferred installation be the PHP application running on its own instance of Apache and PHP.

I want this for a few reasons...

Support - If they use this "Package" I can support them 100%
To make it easier for those who dont know how to work with Linux servers or how to install Apache/PHP, or how to manage them
So that it will be in its own environment, not in same service with other "websites" or applications
...are very strong.
You'll end up with a bunch of clueless people that have no clue about webservers => you'll end up having to take care about all their needs (performance, security, stability).
For example you'll have to act every time that a user will want to run any additional webservice (and that need some kind of different Apache/PHP setting because of the other webservices), every time that Apache/PHP provides some security patches, etc... .
Additionally, I'm not sure what you'll have to do with the various dependencies of Apache/PHP if you run it full standalone.
My best recommendation would be to run it in some kind of linux "container" as the others have stated as well, but that won't match your requirements.
 
  


Reply



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 - php: a single directory with fastcgi eantoranz Linux - Server 2 05-31-2013 08:30 AM
Creating a VPN Server using Lenny with a single NIC DaFakaMatt Linux - Server 5 09-06-2010 10:02 AM
Need Apache, mod_perl and PHP in single monolithic binary kapshure Linux - Software 1 08-02-2010 08:11 PM
Single sign on with AD in php application with apache tanveer Linux - Server 0 11-01-2007 03:07 AM
Creating Single Instance linux application praj_linux Programming 2 11-19-2004 04:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:03 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