Computer Talk Discussions here pertain to mods, troubleshooting, and PC/console gaming

Fooling with Apache

Thread Tools
 
Search this Thread
 
Old Feb 10, 2005 | 09:28 PM
  #1  
Churnd's Avatar
Thread Starter
Registered User
 
Joined: Jan 2003
Posts: 4,087
Likes: 1
From: Hattiesburg, MS
Fooling with Apache

Let me know if anyone has any trouble seeing this page...

http://hearn.serveftp.com

Basically, I'm just learning how to run my own web server with Apache. It's nothing fancy for now, just trying to see if it'll work. It's running fine on my other laptop but I wanted to see if anyone else had trouble viewing it.
Reply
Old Feb 10, 2005 | 09:30 PM
  #2  
WATRD's Avatar
Contributing Member
 
Joined: Oct 2002
Posts: 5,089
Likes: 0
From: Duvall, WA
It looks like an "under construction" page
Reply
Old Feb 10, 2005 | 09:41 PM
  #3  
Churnd's Avatar
Thread Starter
Registered User
 
Joined: Jan 2003
Posts: 4,087
Likes: 1
From: Hattiesburg, MS
Originally Posted by WATRD
It looks like an "under construction" page
Wooooo Hoo!!!!!!

Rob, I figured maybe you'd know something about this. I downloaded AppServ which comes with Apache, MySQL and other little doodads. I probably need to read up on how to actually use it (i.e., make it more secure for my server), because once I figured this out it seemed a little too easy. Any pointers? I want to learn how to use MySQL but I don't know exactly what it can do.
Reply
Old Feb 10, 2005 | 09:43 PM
  #4  
Poopshute's Avatar
Registered User
 
Joined: Feb 2005
Posts: 193
Likes: 0
From: Boulder, Colorado
what exactly do you wanna do? If you're just making an informational site you don't really need to make it any more secure than it is. I mean just make sure you permissions for the files you have are read only...
Reply
Old Feb 10, 2005 | 09:55 PM
  #5  
WATRD's Avatar
Contributing Member
 
Joined: Oct 2002
Posts: 5,089
Likes: 0
From: Duvall, WA
Originally Posted by Churnd
Wooooo Hoo!!!!!!

Rob, I figured maybe you'd know something about this. I downloaded AppServ which comes with Apache, MySQL and other little doodads. I probably need to read up on how to actually use it (i.e., make it more secure for my server), because once I figured this out it seemed a little too easy. Any pointers? I want to learn how to use MySQL but I don't know exactly what it can do.
The biggest deal to keep in mind with a webserver is to keep permissions as low as you possibly can. NOTHING should ever be permissioned to 777. 755 is all you will ever need and even then most scripts won't need even that. That is fully half the battle when it comes to security.

If you install PHP on your Apache/MySQL box, you have a SERIOUSLY powerful combination. PHP and MySQL are designed from the ground up to work together. It's still under construction, but take a look around the WATTORA site. The forum and all the members features are run via PHP and MySQL.

In answer to what you can do... with that combination, you can do anything you have ever seen on a website
Reply
Old Feb 11, 2005 | 05:10 AM
  #6  
Churnd's Avatar
Thread Starter
Registered User
 
Joined: Jan 2003
Posts: 4,087
Likes: 1
From: Hattiesburg, MS
As far as permissions go...

I couldn't really find anywhere that included the numbers 777 or 755. I hope I'm not doing myself wrong by posting some of my .conf file here but I've found these sections and wonder if they have to do with configuring my permissions correctly...

# First, we configure the "default" to be a very restrictive set of
# permissions.
#
(Directory />
Options FollowSymLinks ExecCGI Indexes
AllowOverride None
(/Directory>
Or possibly another part...

# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
(/Directory>
I know it probably should be somewhere in that neighborhood of the .conf file, but don't know where...

To get some of the code to show up properly, I had to change the beginning "<" on each "Directory" to "("

Last edited by Churnd; Feb 11, 2005 at 05:13 AM.
Reply
Old Feb 11, 2005 | 05:30 AM
  #7  
jacksonpt's Avatar
Senior Member
 
Joined: May 2002
Posts: 2,752
Likes: 0
From: Binghamton, NY
Originally Posted by WATRD
The biggest deal to keep in mind with a webserver is to keep permissions as low as you possibly can. NOTHING should ever be permissioned to 777. 755 is all you will ever need and even then most scripts won't need even that. That is fully half the battle when it comes to security.

If you install PHP on your Apache/MySQL box, you have a SERIOUSLY powerful combination. PHP and MySQL are designed from the ground up to work together. It's still under construction, but take a look around the WATTORA site. The forum and all the members features are run via PHP and MySQL.

In answer to what you can do... with that combination, you can do anything you have ever seen on a website
I've been using Apache, PHP, and MySQL for a long time. Open source is the shizzle.
Reply
Old Feb 11, 2005 | 05:48 AM
  #8  
Churnd's Avatar
Thread Starter
Registered User
 
Joined: Jan 2003
Posts: 4,087
Likes: 1
From: Hattiesburg, MS
Originally Posted by jacksonpt
I've been using Apache, PHP, and MySQL for a long time. Open source is the shizzle.
Fo' rizzle!
Reply
Old Feb 11, 2005 | 06:10 AM
  #9  
WATRD's Avatar
Contributing Member
 
Joined: Oct 2002
Posts: 5,089
Likes: 0
From: Duvall, WA
777 and 755 refer to the permissions of the folders that contain your web facing files. Look up the term "chmod".

http://catcode.com/teachmod/

You are on the right track by locking things down. If in doubt, make things more restrictive and loosen up permissions as you need them, not the other way around.
Reply
Old Feb 11, 2005 | 08:17 AM
  #10  
Churnd's Avatar
Thread Starter
Registered User
 
Joined: Jan 2003
Posts: 4,087
Likes: 1
From: Hattiesburg, MS
Originally Posted by WATRD
777 and 755 refer to the permissions of the folders that contain your web facing files. Look up the term "chmod".

http://catcode.com/teachmod/

You are on the right track by locking things down. If in doubt, make things more restrictive and loosen up permissions as you need them, not the other way around.
I'm running Apache in Windows, if that matters.
Reply
Old Feb 11, 2005 | 08:23 AM
  #11  
WATRD's Avatar
Contributing Member
 
Joined: Oct 2002
Posts: 5,089
Likes: 0
From: Duvall, WA
Ah... I can't help you much there. I have completely abandoned Windows hosting in favor of *nix hosting.
Reply
Old Feb 11, 2005 | 08:48 AM
  #12  
jacksonpt's Avatar
Senior Member
 
Joined: May 2002
Posts: 2,752
Likes: 0
From: Binghamton, NY
Originally Posted by Churnd
I'm running Apache in Windows, if that matters.
Assuming it's XP or 2000... click on the folder that contains your web files, click the security tab, and look at the permissions set for EVERYONE. Then do this for all the files/folders inside that folder. For all of these, make sure the inheritance checkbox is checked (lower left hand corner).

Set everything to read only... then increase the accessability as necessary. It'll probably take some playing around with, and it may very well get frustrating and tedious, but it's very much worth it in the long run.
Reply
Old Feb 11, 2005 | 11:42 AM
  #13  
CynicX's Avatar
Contributing Member
 
Joined: Jul 2004
Posts: 2,370
Likes: 0
sweetness.....I was about to setup something similar or learn how too before I ˟˟˟˟ my computer up a little, regardless I got it back up and running....

Maybe you can post some link of where you downloaded apache and any information you have thus far. Then I can give it a try
Reply
Old Feb 11, 2005 | 11:44 AM
  #14  
jacksonpt's Avatar
Senior Member
 
Joined: May 2002
Posts: 2,752
Likes: 0
From: Binghamton, NY
Apache is open source, which means it's free to the public. You can download the http server directly from the Apache site. Setup is pretty straight forward.
Reply
Old Feb 11, 2005 | 01:59 PM
  #15  
Churnd's Avatar
Thread Starter
Registered User
 
Joined: Jan 2003
Posts: 4,087
Likes: 1
From: Hattiesburg, MS
Cynicx -

Here's what I've learned so far:
  • When you install Apache, you don't really "see" it running. It just creates a service.
  • Setup is pretty straightforward, and anything you enter can be changed in your .conf file later
  • It'll create a folder on your c:/ drive called "www". Anything you place in this folder will be made viewable online. Any html file labeled index will be the first page it looks for.
Reply
Old Feb 11, 2005 | 02:34 PM
  #16  
CynicX's Avatar
Contributing Member
 
Joined: Jul 2004
Posts: 2,370
Likes: 0
I'm a bit confused.....where do you get the domain name from?....sorry I should really read up on it before asking questions.....

EDIT: I'm dumb, I dunno what I was thinking, I had the port closed in my router....derrhhh

Last edited by CynicX; Feb 11, 2005 at 02:57 PM.
Reply
Old Feb 11, 2005 | 02:56 PM
  #17  
Churnd's Avatar
Thread Starter
Registered User
 
Joined: Jan 2003
Posts: 4,087
Likes: 1
From: Hattiesburg, MS
If I recall right, you signed up with no-ip.com, right? Well, whatever name you used for your FTP server, you can use the same one for your web (HTTP) server. It's just a name for your computer that's more handy to use instead of remembering and typing in a full IP address every time. The domain name just points to your IP address. That little program you downloaded updates no-ip to your current IP address in case it changes. If you had a static IP (which costs more), you wouldn't need that.

So, once you get Apache up and running, your address would be http://cynicx.myftp.org.

Your domain name is cynicx.myftp.org.

Last edited by Churnd; Feb 11, 2005 at 02:58 PM.
Reply
Old Feb 11, 2005 | 02:58 PM
  #18  
CynicX's Avatar
Contributing Member
 
Joined: Jul 2004
Posts: 2,370
Likes: 0
lol if you click that link you'll see my progress....
Reply
Old Feb 11, 2005 | 03:09 PM
  #19  
Churnd's Avatar
Thread Starter
Registered User
 
Joined: Jan 2003
Posts: 4,087
Likes: 1
From: Hattiesburg, MS
Great, that means you have it up and running. Now all you do is design web pages to reside in that folder. As far as the structure of how to maintain that folder, I'm not 100% sure. I think you should be able to create other folders for different web pages as long as you point to them correctly through the index.html file.

That page you see right now is just a pre-written html file that came with Apache.

I think you should also be able to host as many sites as you want through different domain names as long as you edit the .conf file correctly and create different domain names for them.

Last edited by Churnd; Feb 11, 2005 at 03:10 PM.
Reply
Old Feb 11, 2005 | 03:12 PM
  #20  
WATRD's Avatar
Contributing Member
 
Joined: Oct 2002
Posts: 5,089
Likes: 0
From: Duvall, WA
Pages are served up via the following scheme;

You can use any of the following (listed in order of priority):
index.htm
index.html
index.shtml
index.shtm
index.php
index.php3
default.htm

The root page, the page that people see when they hit the domain must be in the root, but from there you can build any directory structure that you may desire.
Reply



All times are GMT -8. The time now is 12:24 AM.