Build localhost website in slackware

Localhost website will be useful when we have a small home/office network that required some fake website as a server or financial server. It will look like a real website but without necessary connecting to internet.
These are the steps to build local website with slackware. Slackware I use is slackware 13.0.

First make sure mysql, httpd and dhcp (if necessary) are running in terminal.

#su
#ps x | grep httpd
#ps x | grep mysql
#ps x | grep dhcp

If there are result show in your terminal then all the module is loaded.

Making the sql’s database. Do these command in terminal

$mysqladmin -h localhost -u root -p create mydatabase

Check in folder /var/lib/mysql there will mydatabase file

Or the second command

$mysql -p
CREATE DATABASE mydatabase;

make sure there is a ; sign at the back of the command.

Run php before installing wordpress
Edit /etc/httpd/httpd.conf the uncomment mod_php.conf

$nano /etc/httpd/httpd.conf

Add index.php line in /etc/httpd/httpd.conf sub DirectoryIndex

DirectoryIndex index.html index.htm index.php default.htm
And ServerName 192.168.1.9:80

Then save it and out

Edit /etc/hosts add this line 192.168.1.9 sugi.sugi.com sugi (for example)
Add in /etc/HOSTNAME sugi.sugi.com

Edit /etc/rc.d/rc.inet1.conf
And put the static ip there like 192.168.1.9 or anything you would like as long as it is the same with /etc/hosts.

Now everything should work.
Try to check them by opening your browser and type localhost
There will be a text : It works!

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.