Local Web Server For Web Development?
gwilymgj writes "I have been running Apache/MySQL for years using XAMP and WAMP on windows for web development. Recently I switched to using Ubuntu in VMware player, it is much faster and it also introduces me to a 'real' reason to play with Linux (been looking for a 'real' reason for ages). Are there any specific distributions which allow you to have a virtual webserver on your desktop? Any tips and tricks out there for this?"
You can run apache and listen only on your internal IP. There are plenty to choose from. I'd recommend openSuSE or slackware if you're brave.
They're using their grammar skills there.
There's nothing wrong with running a local-only web server. I do it all the time -- just bind it to localhost, rather than in_addr_any, and no one else can see your development system.
I have no idea what you mean by 'virtual webserver' in this context. If you're attempting to run virtual hosts through a local web server for development purposes, you can adjust /etc/hosts (or whatever the mechanism is on your OS) so that the domain names point to 127.0.0.1, and your web browser will send the Host header.
Build it, and they will come^Hplain.
> Are there any specific distributions which allow
> you to have a virtual webserver on your desktop?
> Any tips and tricks out there for this?
I use FreeBSD myself, it's rather well documented (in my experience most of the documentation is better than or on par with Linux), even if the tools aren't as slick and GUI.
That being said, in the end, the OS choice really should be that of the user. I've used Apache/MySQL in Windows, Linux and FreeBSD. My preferences are towards Windows and FreeBSD. Both (for me) are easy to admin, and while the latter is incredibly fast, the peformance hit with the former on small scale testing isn't that bad. I tend to be more concerned with ease of administration and the UI performance because on any of the operating systems, the web server performance is more than sufficient for small and medium scale testing (depending on hardware, YMMV).
That being said:
(1) Jailed/Sandboxed/VMed environments are a nice security touch to help keep your system safe.
(2) If MySQL and Apache are on the same server, you may want to turn of networking and use local sockets for some extra security. This is well documented in the config file comments.
(3) Likewise, you can turn off the remote access for Apache. If you are using a jailed/sandboxed/VM environment, then this may not be an option unless you want to open the browser from within the jail/sandbox/VM.
Currently I'm playing with some stuff (a friend wants me to get [not so-]Zen Cart working for him) on my desktop. I have apache/php/mysql in a jail under FreeBSD. I'm behind a firewall, so I don't bother much with port restriction on Apache. With PHP I used the secure/recommended config file, and with mysql, I turned off networking (using a local socket). There are instructions for generating self signed certificates using OpenSSL if that has relevance to your work. It's not hard, and google can get you what you need quickly, if it's relevant.
Hope that helps.
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).