First of all update and upgrade your system:
Edit /etc/httpd/conf/extra/httpd-mpm.conf to have this:
To make Apache auto-start at boot:
Now type localhost in your browser. This should show Index / in browser because no file is currently there.
Now configuring virtual hosts.
Edit file: /etc/httpd/conf/httpd.conf and edit the line containing DocumentRoot and set it to:
Now go to almost bottom of the file i.e. near line 500 (or 92% of file) and Uncomment the line:
Now open /etc/httpd/conf/extra/httpd-vhosts.conf and paste the following:
You can replace localhost with your domain name.
Now create the directories according to the configuration done above:
Now restart Apache:
It will still show you an Index / page when you type in ‘localhost’ in the browser. If you want a custom web page to appear while doing the same, then go and createa new file:
And add some text that you want it to show. That’s it.
In Arch, MariaDB can be used alternatively of MySQL.
So, installing the mariadb, mariadb-clients and libmariadbclient packages using the following command:
Install MariaDB data directory:
All mysql command will work as usual with MariaDB.
Now to make it start on boot:
At last, to have secure installation, run:
And set root password (Press Enter for current password) and then enter new password for root. Remove remote login, anonymous users, test database and reload privileges tables.
You can now test the installation by firing this command:
It will prompt for your password that you have just set.
Then you can try creating database, tables as usual.
Edit /etc/php/php.ini and search for following lines and uncomment and modify them:
Create the log directory for PHP and give the Apache user ownership:
Enable the PHP module in the
/etc/httpd/conf/httpd.conf by adding these lines at the end:
In the same file, comment out the line
LoadModule mpm_event_module modules/mod_mpm_event.so by adding a
# in front, and add the line:
And add the following line:
Restart Apache server:
Install phpMyAdmin using the following command:
mcrypt by editing
/etc/php/php.ini and uncommenting the following lines:
You need to make sure that PHP can access
/etc/webapps. Add it to
/etc/php/php.ini if necessary:
Edit /etc/httpd/conf/extra/phpmyadmin.conf file:
Restart Apache again:
Now click on http://localhost/phpmyadmin/ and see phpMyAdmin opening in the new tab.