[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 110: Undefined array key "cached"
[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 111: Undefined array key "normal"
[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 112: Undefined array key "total"
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3391: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3393: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3394: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3395: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
Cabrillo College Linux Classes • View topic - web page how to?

web page how to?

UNIX/Linux Installation & Configuration

web page how to?

Postby Leif Husman on Thu Oct 23, 2008 10:11 am

Okay, I was never interested in writing web pages before, but now that I got one I want to put something up. What program do I run? The how-to's seem to be just FAQ's written for people who don't have my problems. I'm going to randomly edit files and see what happens...


rK

BTW, thanks, Rich
Leif Husman
 
Posts: 47
Joined: Tue Sep 02, 2008 7:14 pm

Re: web page how to?

Postby Leif Husman on Thu Oct 23, 2008 12:24 pm

I can see my webpage from the computer in the next room, but someone in san jose can't see it. The "address" is 192.168.11.2. What would the outside world need to get to my website? Can I do it for free?


rK
Leif Husman
 
Posts: 47
Joined: Tue Sep 02, 2008 7:14 pm

Re: web page how to?

Postby Jonathan Simms on Thu Oct 23, 2008 12:35 pm

I've never set up apache before but I did find this page that looks like it might be helpful:
http://www.linuxhomenetworking.com/wiki ... T_Firewall
Jonathan Simms
 
Posts: 119
Joined: Tue Sep 02, 2008 7:11 pm

Re: web page how to?

Postby Kayla Smith on Thu Oct 23, 2008 2:17 pm

Also, this will help you understand what's going on:

[url]http://en.wikipedia.org/wiki/Private_network[/url]
Kayla Smith
 
Posts: 67
Joined: Tue Sep 02, 2008 7:11 pm

so where am I?

Postby Leif Husman on Thu Oct 23, 2008 6:14 pm

am I not then on the internet? Where am I?


rK
Leif Husman
 
Posts: 47
Joined: Tue Sep 02, 2008 7:14 pm

Re: web page how to?

Postby Jonathan Simms on Thu Oct 23, 2008 8:44 pm

the 192.168.11.2 is your private ip address; the ip address that everyone else sees, your public ip address, will be the address of your default gateway. Here's a website, http://www.whatsmyip.org/more/ , that will tell your external, or default gateway, ip address.
Jonathan Simms
 
Posts: 119
Joined: Tue Sep 02, 2008 7:11 pm

Re: web page how to?

Postby 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
User avatar
Rich Simms
Site Admin
 
Posts: 640
Joined: Thu May 15, 2008 2:44 pm


Return to CIS 191A - Fall 2008

Who is online

Users browsing this forum: No registered users and 0 guests

cron