Linux, Apache, MySQL and PHP

Install apache, MySQL and PHP as described in the LAMP howto on Arch Linux Wiki.

When you want to access the webpage from your workstation, you need to open port 80 in the firewall.

To check what rules are present run

[root@Server]$ iptables -L --line-numbers

then run this command to insert the rule at line 14 in the input chain

[root@Server]$iptables -I INPUT 14 -p tcp -m tcp -s --dport 80 -j ACCEPT

Remember to run

[root@Server]$ /etc/rc.d/iptables save

to save the new rules permanently

Virtual Hosts

Edit the file /etc/httpd/conf/httpd.conf and uncomment the line

Include /etc/httpd/conf/extra/httpd-vhosts.conf

Edit the file /etc/httpd/conf/extra/httpd-vhosts.conf and add any virtual host you need

Example :

    DocumentRoot /home/httpd/server2
    ErrorLog "/var/log/httpd/server2.ld_log"
    CustomLog "/var/log/httpd/server2.ld_log" common
    <Directory "/home/httpd/server2">
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all

Remember to restart the server.

[root@Server]$ /etc/rc.d/httpd restart


Arch-Linux Server