Obsolete:LAMP instances

From Wikitech
Jump to navigation Jump to search

This page is about how to create and administer VPS instances running the LAMP stack.

Linux (create an instance)

A few clicks will get you a Labs instance running Apache, MySQL, and PHP:

  1. Make sure your instances are accessibly from the web, create a 'Web" security group: see Help:Security Groups.
  2. In the left bar, click "Manage Instances", then click 'Add Instance', and add your new instance to the 'Web' security group (and any other security groups that you anticipate needing).
  3. Reach the "configure" page of the instance from Special:NovaInstance. Check the box next to role::lamp::labs in the 'apache' section.
  4. Configure the domain: see Help:Proxy.
  5. Choose a sub-server name (for instance "myproject"), and select your instance.
  6. You can now access your web server at https://myproject.wmflabs.org and http://myproject.wmflabs.org , both pages should show "It works".
  7. The default page can be modified at /var/www/index.html

Other modules: There are multiple MySQL modules in the configuration page. It's not clear what they do; avoid them.


To restart: sudo apache2ctl graceful

MySQL or MariaDB

If you need MariaDB, for instance because you need to match some Wikimedia production service, avoid using any of the existing database modules, which (as of 2015) will all work against you.

Instead, just do sudo apt-get install mariadb-server and proceed from there, following instructions of the software you are installing or any other LAMP/other stack setup guide on the web. Expect some quirks, as for several things the Labs servers don't follow the usual distribution defaults.


Add to or change the PHP configuration by editing:

  • /etc/php5/apache2/conf.d/99-<projectname>.ini for Apache (after editing this you'll need to restart Apache; see above); and
  • /etc/php5/cli/conf.d/99-<projectname>.ini for the CLI.

Other INI files will be overwritten on PHP upgrades.

See also