by Rich Simms on Fri Oct 24, 2008 7:34 pm
Hi Leif,
With the Benji VM we made you have a complete web publishing solution. Here are some things to get you started.
1) Any HTML document you put in the /opt/lampp/htdocs/ directory will be published.
Here is a simple html document named sample.html you could create and modify in the htdocs/ directory:
[code][root@benji htdocs]# vi sample.html
[root@benji htdocs]# cat sample.html
<html>
<head>
<title>My first page</title>
</head>
<body>
<h1>My first web page</h1>
<p>Nothing can stop me now</p>
<a href="http://google.com">My link to Google</a>
</body>
</html>
[root@benji htdocs]#
[/code]
Then browse to your new web page using [b]http://xxx.xxx.xxx.xxx/sample.html[/b] where xxx.xxx.xxx.xxx is the ip address of your server. Show you IP address with the ifconfig command.
2) To go live on the Internet you would have to hook your computer up directly to your DSL or cable connection. The home router you are using does NAT (network address translation) which prevents outsiders from making connections to your computer(s). It is the home router that is giving you the 192.168.11.2 private address. If you connect directly then you should restart your network layer (service network restart) so your VM's ethernet port will get a real IP address from your ISP (using DHCP). If your ISP provides you with a static IP (more expensive) you would have to configure a static configuration instead.
3) Note PHP is already in place on your Benji VM. Place any .php files in your htdocs/ directory and they will be published just like the HTML docs.
4) Make your first MySQL database by browsing to [b]http://xxx.xxx.xxx.xxx/phpmyadmin/[/b] and use the Create button. PHP and MySQL work together really well to develop dynamic content using database information.
Have fun,
- Rich