Cable Forum

Cable Forum (https://www.cableforum.uk/board/index.php)
-   General IT Discussion (https://www.cableforum.uk/board/forumdisplay.php?f=19)
-   -   Server Questions - Anybody Feeling Brave? (https://www.cableforum.uk/board/showthread.php?t=25689)

Raistlin 14-03-2005 23:13

Server Questions - Anybody Feeling Brave?
 
Ok, I know I've got a couple of different threads running about servers (for one reason or another), if a passing Mod wants to merge them then fine but it makes more sense to me to keep them seperate as they're not really related.

So, my shiny new (or should that be dull, beige, old) server is up and running along quite nicely. Already have my first upgrade planned (two new Seagate Barracuda HDDs at 80Gb each).

I have a couple of questions will fall into the sort of Administrative side though which I'm hoping somebody with more experience can help me with.

1. I think (more for the sake of vanity than for any other reason) that I would like to be able to upload a sort of "Server Status Page" to the web (have web space so that's not an issue). The idea being that I could then browse to the page from anywhere and see if the server is up, how long it's been running without falling over, get some basic information from it etc.

Is this actually possible? What sort of software/setup would I need? Is it fairly easy to accomplish or am I trying to run before I can walk?

2. Somewhere along the line the chances are that I would like to be able to access the server remotely (I'm on a course at the end of the month in London so that would be a great opportunity to try this out). What are the practical problems associated with this?

I know that I would need to set up the server to allow me to access it from outside the network, presumably I would also need to "tweak" the router as well to allow this? How do I get around the fact that NTL IP addresses are dynamic? I suppose I could have the server upload it's current IP address to the Web but that's probably a bit dodgy (not to mention the fact that the IP is assigned by the router and therefore wouldn't actually reflect the NTL IP address).

I'm afraid these questions probably just constitute a "Starter For 10" but hopefully nobody minds me asking? I promise to repay the favour if I get a chance :D

Cheers Guys (and lovely Gals of course ;) )

Raist.
__________________

Sorry, should have said.

SACM > Router > Server

Server = Windows Server 2003 Std
Laptop = Windows XP

No other software on the server yet apart from Windows.

Millay 14-03-2005 23:22

Re: Server Questions - Anybody Feeling Brave?
 
check out www.no-ip.com to solve the problem of your ip addy.

you will need to set up port forwarding, a quick search of the kb over at ms will hopefully give the correct ports to map i cant remeber them of the top of my head.

Raistlin 14-03-2005 23:26

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Millay
check out www.no-ip.com to solve the problem of your ip addy.

you will need to set up port forwarding, a quick search of the kb over at ms will hopefully give the correct ports to map i cant remeber them of the top of my head.

Thanks for that no-ip might solve at least part of the problem.

Cheers.

Millay 14-03-2005 23:37

Re: Server Questions - Anybody Feeling Brave?
 
As for server status, if you can log in to the server, surly going that way would be a good way to see if its up etc..

I do not know about server 2003, but SBS 2003 has monitoring and reporting services straight out the box, this emails you about certain things, and using the remote web workplace you can view server up time etc that way...

The last server I set up was Windows 2000 and NT, althoguh i have done several SBS 2003 so thats more my bag, sorry I can not be more help

Raistlin 14-03-2005 23:39

Re: Server Questions - Anybody Feeling Brave?
 
You've been a great help already - thanks very much.

Richard M 15-03-2005 00:00

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Raistlin
1. I think (more for the sake of vanity than for any other reason) that I would like to be able to upload a sort of "Server Status Page" to the web (have web space so that's not an issue). The idea being that I could then browse to the page from anywhere and see if the server is up, how long it's been running without falling over, get some basic information from it etc.

This will do you:
PHP Code:

<?php
$output 
= shell_exec('uptime');
echo 
"<html><title>Server Uptime</title><body><h1>Server Uptime:</h1><p>$output</p></body></html>";
?>

My version is running here:
http://richard.phpfuture.net:8080/

I used to have the \\elisha has been up for: 30 day(s), 4 hour(s), 11 minute(s), 10 second(s) bit within <pre> tags but my mobile phone won't render text in these for some reason so I use <p> tags instead.
It's pretty cool being able to check if your server is OK when you're in the coffee shop. :cool:

You'll need either IIS & PHP or (recommended, for security) Apache & PHP.
I wrote a guide on this ages ago, which you can view here:
http://www.cableforum.co.uk/board/sh...701#post220701
If you have any questions I'm a bit of an Apache expert so don't be shy. :)

EDIT: Forgot to mention, you'll need the Uptime.exe file from M$ - just drop it into your c:/winnt/system32/ directory...
http://www.microsoft.com/technet/arc...ds/uptime.mspx

P.S - Check out my HTTP headers from the server for random Monty Python quotes. ;) :rofl:

iron25 15-03-2005 00:05

Re: Server Questions - Anybody Feeling Brave?
 
1 Attachment(s)
You mention that ntl ip addresses are dynamic but in my experience they are not. I have a STB and the ip address that I have now I have had for several months now. I don't know if it is different with a SACM.

I think RemotelyAnywhere from http://www.remotelyanywhere.com/ should cover both points. I have used versions 4 & 5 in the past before moving onto Remote Admin from http://www.radmin.com/ and RemotelyAnywhere allows you to access and administer your server from the web. It's pretty nifty and will tell you everything you need to know about how your server status, it's worth a look.
__________________

here's a screen print
__________________

Millay 15-03-2005 00:08

Re: Server Questions - Anybody Feeling Brave?
 
I used to use remotly anywhere it is a crackin product although i can no longer justify the expense...

what I really want is KVM with remote access..

iron25 15-03-2005 00:08

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Richard M
It's pretty cool being able to check if your server is OK when you're in the coffee shop

You say cool, I say sad :p:

Raistlin 15-03-2005 00:10

Re: Server Questions - Anybody Feeling Brave?
 
Hi Richard,

Thanks for that.

So, first step then is to install Apache and PHP and get them set up and running as per your guide.

Once that's done if I post back will you give me some pointers on where to go next please (polite pointers that is ;) ).

Thanks for your help so far.
__________________

Thanks for that Iron, I'll take a look at those links tomorrow.

iron25 15-03-2005 00:11

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Millay
I used to use remotly anywhere it is a crackin product although i can no longer justify the expense...

what I really want is KVM with remote access..


When I used RemotelyAnywhere I was always trialling it ;) so I don't know how much it costs.

Richard M 15-03-2005 00:14

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Raistlin
Hi Richard,

Thanks for that.

So, first step then is to install Apache and PHP and get them set up and running as per your guide.

Once that's done if I post back will you give me some pointers on where to go next please (polite pointers that is ;) ).

Thanks for your help so far.

BTW - Ignore the bit at the end of the guide about stopping Apache from running - you'll want it running all the time if it's a server.
Also don't worry about MySQL just yet - all you need is Apache/PHP.
__________________

Quote:

Originally Posted by iron25
Quote:

Originally Posted by Richard M
It's pretty cool being able to check if your server is OK when you're in the coffee shop

You say cool, I say sad :p:

Everyone in work seems quite impressed with the stuff I can do (IT Dept ;))...
For example, the image in my sig is actually some complicated server code that will count the time I'm offline for and if it reaches 2 weeks it will send emails, change webpages and send messages over MSN, among other stuff.
It's basically an automated system that I've been working on for a couple of years now that will keep track of me and if I'm offline for too long then it will assume something nasty happened to me so will inform certain people and do certain tasks that I assign to it...anyway - that's for another topic.

Raistlin 15-03-2005 00:15

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Richard M
BTW - Ignore the bit at the end of the guide about stopping Apache from running - you'll want it running all the time if it's a server.
Also don't worry about MySQL just yet - all you need is Apache/PHP.

Ok, cool (and no, it isn't sad.....not really).

I'll work on those tomorrow when I'm a bit more awake.

Like the idea of being able to check with mobile phone, that's a really neat trick. I take it that will work OK with the opera browser installed on my phone?

iron25 15-03-2005 00:17

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Richard M
Everyone in work seems quite impressed with the stuff I can do (IT Dept ;))...

You know what they say, little things please little minds :D

I have to admit, it takes alot for me to be impressed by something.

Raistlin 15-03-2005 00:22

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Richard M
For example, the image in my sig is actually some complicated server code that will count the time I'm offline for and if it reaches 2 weeks it will send emails, change webpages and send messages over MSN, among other stuff.
It's basically an automated system that I've been working on for a couple of years now that will keep track of me and if I'm offline for too long then it will assume something nasty happened to me so will inform certain people and do certain tasks that I assign to it...anyway - that's for another topic.

I think we're going to need a "Workshop" area of the site soon, a different workshop each week - with a resident expert talking us through things step by step.

:D

iron25 15-03-2005 00:45

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Richard M
For example, the image in my sig is actually some complicated server code that will count the time I'm offline for and if it reaches 2 weeks it will send emails, change webpages and send messages over MSN, among other stuff.
It's basically an automated system that I've been working on for a couple of years now that will keep track of me and if I'm offline for too long then it will assume something nasty happened to me so will inform certain people and do certain tasks that I assign to it...anyway - that's for another topic

Quote:

Originally Posted by Raistlin
I think we're going to need a "Workshop" area of the site soon, a different workshop each week - with a resident expert talking us through things step by step.

:D

Resident expert :scratch: more like resident nerd :D am I the only one without a raincoat around here :p:

Raistlin 15-03-2005 00:49

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by iron25
Resident expert :scratch: more like resident nerd :D am I the only one without a raincoat around here :p:

:LOL:

Not fair, I get the same treatment at work - I share my geekiness and get mocked for it :bigcry:

I've got a lot of respect for people that have spent a lot of time learning how to do stuff like this. Mainly because I understand how difficult it can be.

Raistlin 15-03-2005 01:23

Re: Server Questions - Anybody Feeling Brave?
 
2 Attachment(s)
Ok, just tried to install Apache and got the following error messages.

Followed the instructions in your text file to the letter Richard but seems I might have a teenie problem somewhere.....

Any ideas?
__________________

I understand that the second one is being caused by the fact that the actual install seems to have failed somewhere along the lines, I suppose it's just the first that need sorting.

Thanks

Millay 15-03-2005 01:26

Re: Server Questions - Anybody Feeling Brave?
 
I could be wrong but as you are still online will give you, my intial thought as to what it was, pls remeber I am not an apache expert by any strech of the mark.

But the error you seem to be receiving would be caused by the mdule not being found in your httpd.conf file.

open httpd.conf file and make sure the root directories leading to the required files are correct.

I could be worng, but feel happy i could sort this but perhaps not explain it to well..

Raistlin 15-03-2005 01:27

Re: Server Questions - Anybody Feeling Brave?
 
I'll take a look and see if there's anything obvious.

TBH I did have a poke around in there but it's such a jumble I didn't even know where to begin :D

Millay 15-03-2005 01:28

Re: Server Questions - Anybody Feeling Brave?
 
i dont ahve apache installed on my lappy, and its to late to crack puTTy out now!.. but i beleive you can set the root directories for it to use, at present it is using c:\windows\system32

Raistlin 15-03-2005 01:29

Re: Server Questions - Anybody Feeling Brave?
 
Ahh...

Hang on, the error message is coming up during the installation.

I can't edit the httpd.conf file until after the installation has complete.

So, even if I did manage to make the required changes (without making matters worse) how could I then go back and re-do the portion of the install that failed?

Don't mean to throw obstacles at this but I'm totally new to this Apache lark :D

Millay 15-03-2005 01:39

Re: Server Questions - Anybody Feeling Brave?
 
good point, did wonder if this was durring instal, did you download the straight apache instal or go for a distribution like swamp?

and do you have a directory and file called c:\conf\httpd.conf?

I really could be wrong, but I think the error may be coming when the instal tries to start the apache2 service, have a look under services and see if the service is registered and waiting to be started...

<-- all this is just pointers am afraid, as I have as much of an idea about installing this as you do, ive only ever done it twice.. and needed 6 valium afterwards to regain composure... <--- so dont be surprised if someone comes along and gives you correct advice :)

iron25 15-03-2005 01:45

Re: Server Questions - Anybody Feeling Brave?
 
Unfortunately, my apache experience is for a linux environment so I'm probably not going to be much help but I'm running server 2003 and I have just downloaded the installer from http://httpd.apache.org/download.cgi after a few attempts at installing it I realised IIS was interfering with the installer, once I turned the service off it it installed without a hitch. Where did you download your installer from?

Raistlin 15-03-2005 01:50

Re: Server Questions - Anybody Feeling Brave?
 
Yep, the c:\conf directory does exist, as does the file.

Nope, no services waiting to be started and the Apache icon (in the system tray) says "No Services Installed" if you hover over it with the mouse.....
__________________

Quote:

Originally Posted by iron25
Unfortunately, my apache experience is for a linux environment so I'm probably not going to be much help but I'm running server 2003 and I have just downloaded the installer from http://httpd.apache.org/download.cgi after a few attempts at installing it I realised IIS was interfering with the installer, once I turned the service off it it installed without a hitch. Where did you download your installer from?

Downloaded from the same source, the Apache.org site.

Haven't got a service called IIS (or similar) running..
__________________

TBH it's probably getting a bit late for all of this now.

I think I'll uninstall and have another go tomorrow when my head's a but less groggy.

Cheers for all the help guys.

iron25 15-03-2005 01:50

Re: Server Questions - Anybody Feeling Brave?
 
Okay, which file?

This one:

apache_2.0.53-win32-x86-no_ssl.msi

Raistlin 15-03-2005 01:51

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by iron25
Okay, which file?

This one:

apache_2.0.53-win32-x86-no_ssl.msi

apache_2.0.53-win32-x86-no_ssl.msi

Yep, same file

iron25 15-03-2005 01:53

Re: Server Questions - Anybody Feeling Brave?
 
Are you selecting typical install?

Raistlin 15-03-2005 01:55

Re: Server Questions - Anybody Feeling Brave?
 
Nope, "Custom" as per Richard's instructions here:

http://www.cableforum.co.uk/board/sh...701#post220701

iron25 15-03-2005 01:56

Re: Server Questions - Anybody Feeling Brave?
 
Select typical and don't edit any of the paths. You can do that at a later stage once it is installed.

Raistlin 15-03-2005 02:00

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by iron25
Select typical and don't edit any of the paths. You can do that at a later stage once it is installed.

Ok, trying that now.....

Have to uninstall and clear up the directories first.....

Stand by :D

iron25 15-03-2005 02:03

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Raistlin
Ok, trying that now.....

Have to uninstall and clear up the directories first.....

Stand by :D

It's a good thing I'm a night person :)

Raistlin 15-03-2005 02:03

Re: Server Questions - Anybody Feeling Brave?
 
Ok, that sorted it.

Apache now installed without any problems (phew).....

<reaches out and touches something wooden>

I think I'll leave the PHP bit and the rest of the sorting until tomorrow, unless there's anything else that I really must do tonight? I take it that simply having Apache running on the server won't make it less secure?

iron25 15-03-2005 02:08

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Raistlin
Ok, that sorted it.

Apache now installed without any problems (phew).....

<reaches out and touches something wooden>

I think I'll leave the PHP bit and the rest of the sorting until tomorrow, unless there's anything else that I really must do tonight? I take it that simply having Apache running on the server won't make it less secure?

Having apache running will make it less secure. The fewer services running the more secure it will be, that's computers for you :)
__________________

Just found this on the web 'Night people are frequently considered lazy or undisciplined' :erm: That's not fair :D

Raistlin 15-03-2005 02:08

Re: Server Questions - Anybody Feeling Brave?
 
Anything I can do now to help things a bit?

TBH I'm not too worried as it's sat behind my NAT router, just wanted to make sure I wasn't going to come in here tomorrow and find it's been hijacked for <cackle> "Evil Purposes" </cackle>.

iron25 15-03-2005 02:10

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Raistlin
Anything I can do now to help things a bit?

Yeah, disable the service :D

Raistlin 15-03-2005 02:11

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by iron25
Just found this on the web 'Night people are frequently considered lazy or undisciplined' :erm: That's not fair :D

I know my self professed tiredness may make it sound otherwise, but I am actually a Night Person myself. Unfortunately I've seen a few too many whole nights recently along with all of the daylight hours in between.

One day, through perseverance (and with the help of the lovely people here at CF) I hope to have a stable server that has been up longer than I have :D
__________________

Quote:

Originally Posted by iron25
Quote:

Originally Posted by Raistlin
Anything I can do now to help things a bit?

Yeah, disable the service :D

Just use the Apache control panel to switch it off you mean?

iron25 15-03-2005 02:12

Re: Server Questions - Anybody Feeling Brave?
 
Yes.

Raistlin 15-03-2005 02:14

Re: Server Questions - Anybody Feeling Brave?
 
Nice one, will do.

Seriously, thanks for all your help.

I'll be back tomorrow (probably only during the day though - Mrs Raistlin will be about in the evening and will want some attention) to continue with the rest of this Saga :D

Cheers & G'night,

Raist

iron25 15-03-2005 02:15

Re: Server Questions - Anybody Feeling Brave?
 
night, night :sleep:

slowcoach 15-03-2005 02:53

Re: Server Questions - Anybody Feeling Brave?
 
http://www.apachefriends.org/en/ have Windows/Linux/Mac Apache,PHP,MySQL installs which make it all a breeze, there is also information regarding making your site secure if you scroll down the download screen or visit their forum (English section is near the bottom of the forum list).

If you download the Windows installation file (as opposed to the zips) set the install directory to Drive:\ [space] you need to add a space for the install button to become active.
No directory changes are made to your system so you can just delete all the files to get rid.
The Windows version comes with the batch files to run Apache and MySQL as a program or a service, plus batch files to switch between PHP4 and 5.
PHP 5 installs by default.

The German guy and girl who put these compilations together are really dedicated, always including the latest versions. :tu:

Richard M 15-03-2005 07:49

Re: Server Questions - Anybody Feeling Brave?
 
Sounds like you installed directly to c:/ Rais, when I said "change the root to c:" in the install it should have installed to c:/Apache2 or c:/Apache 2 instead of the default c:/Apache Group/Apache2.
It could be that the installer behaviour has changed recently though so maybe that document needs to be updated.

Matthew 15-03-2005 07:51

Re: Server Questions - Anybody Feeling Brave?
 
For Remote Desktop use UltraVNC and you can set it up so you can connect from your internet browser, all you do is put in your ip:5800 and aslong as your router is setup ok it will work and from that you can launch the viewer on yoru server if you want to conenct into a machine within the network.

Raistlin 15-03-2005 11:35

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Richard M
Sounds like you installed directly to c:/ Rais, when I said "change the root to c:" in the install it should have installed to c:/Apache2 or c:/Apache 2 instead of the default c:/Apache Group/Apache2.
It could be that the installer behaviour has changed recently though so maybe that document needs to be updated.

Yep, uninstalled and re-installed, and it worked a treat it the new installation path.

Sorry, it was late last night and I am a bit of a :dunce:

Right, PHP next :D

Stuart 15-03-2005 12:20

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Raistlin
1. I think (more for the sake of vanity than for any other reason) that I would like to be able to upload a sort of "Server Status Page" to the web (have web space so that's not an issue). The idea being that I could then browse to the page from anywhere and see if the server is up, how long it's been running without falling over, get some basic information from it etc.

Is this actually possible? What sort of software/setup would I need? Is it fairly easy to accomplish or am I trying to run before I can walk?

I used to use a program called Servers Alive for this. The nice thing about SA is its freeware (if you don't use it in a commercial environment), but it can query various kinds of servers in different ways. So, for instance, to test a web server, it can periodically call up a web page. For a Database (Oracle anyway, not sure off hand if it supports MySql, but I think it does), it can run a query against it.

It can also output to a server status page (using it's own predefined templates, or your own), as well as email you or text you if something dies.

The program (and tutorials) is at http://www.brentozar.com/salive/default.php

The program itself is at http://www.woodstone.nu/salive/download.asp

Not as much fun as writing something yourself, but a lot quicker..

Raistlin 15-03-2005 12:39

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by leggom
For Remote Desktop use UltraVNC and you can set it up so you can connect from your internet browser, all you do is put in your ip:5800 and aslong as your router is setup ok it will work and from that you can launch the viewer on yoru server if you want to conenct into a machine within the network.

Cheers for that leggom, sounds interesting - I'll certainly give it a go once everything's running smoothly.
__________________

Quote:

Originally Posted by scastle
I used to use a program called Servers Alive for this. The nice thing about SA is its freeware (if you don't use it in a commercial environment), but it can query various kinds of servers in different ways. So, for instance, to test a web server, it can periodically call up a web page. For a Database (Oracle anyway, not sure off hand if it supports MySql, but I think it does), it can run a query against it.

It can also output to a server status page (using it's own predefined templates, or your own), as well as email you or text you if something dies.

The program (and tutorials) is at http://www.brentozar.com/salive/default.php

The program itself is at http://www.woodstone.nu/salive/download.asp

Not as much fun as writing something yourself, but a lot quicker..

Now that sounds interesting as well - too many choices :D

Cheers scastle.
__________________

Ok, new problem :(

Apache was running fine.....

Installed PHP and now the damn thing doesn't want to know.

The Apache service won't start (I get an error 1 in the System event logs) and I can't get the php page to show through my browser (get a 404).

"net start apache2" doesn't work, but then I suppose it won't will it?

I had a look on Google and apparently "error 1" is caused by there already being a service listening on the same port as Apache. Did netstat -a and nothing else is showing on port 80 (or 8080), I think those are the right ports?

Any ideas anybody?

Aragorn 15-03-2005 13:12

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Any ideas anybody?
Has PHP inadvertantly turned on IIS?

In netstat -a you would see '<server>:http' with a status of listening.

The Services mmc, or Net Start, would show whether IIS is running.

Otherwise, try telneting to port 80 from DOS and see if anything responds and what headers it returns.

HTH

Raistlin 15-03-2005 13:31

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Aragorn
Has PHP inadvertantly turned on IIS?

In netstat -a you would see '<server>:http' with a status of listening.

Doesn't look like it:

Active Connections

Proto Local Address Foreign Address State
TCP caramon:epmap caramon:0 LISTENING
TCP caramon:microsoft-ds caramon:0 LISTENING
TCP caramon:1025 caramon:0 LISTENING
TCP caramon:1026 caramon:0 LISTENING
TCP caramon:1054 caramon:0 LISTENING
TCP caramon:netbios-ssn caramon:0 LISTENING
UDP caramon:microsoft-ds *:*
UDP caramon:isakmp *:*
UDP caramon:1044 *:*
UDP caramon:4500 *:*
UDP caramon:ntp *:*
UDP caramon:ntp *:*
UDP caramon:netbios-ns *:*
UDP caramon:netbios-dgm *:*

Quote:

Originally Posted by Aragorn
The Services mmc, or Net Start, would show whether IIS is running.

Otherwise, try telneting to port 80 from DOS and see if anything responds and what headers it returns.

HTH

Nope, neither of those services are showing.

Hmm, not sure I did the telnet correctly, got:

Connecting To 192.168.1.100:80...Could not open connection to the host, on port 23: Connect failed
__________________

Oh, and I just realised the irony of using the word Brave in the thread title when we're talking about Apache so much!!

Aragorn 15-03-2005 13:31

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Hmm, not sure I did the telnet correctly
Try Telnet caramon 80

Raistlin 15-03-2005 13:34

Re: Server Questions - Anybody Feeling Brave?
 
Nope, "Could not open connection to the host, on port 80: Connect failed"

Aragorn 15-03-2005 13:36

Re: Server Questions - Anybody Feeling Brave?
 
Can you cut/paste the Apache error from the sys log?
__________________

Looks like IIS isn't running then and nothing owns port 80.

Raistlin 15-03-2005 13:46

Re: Server Questions - Anybody Feeling Brave?
 
Event Type: Error
Event Source: Service Control Manager
Event Category: None
Event ID: 7024
Date: 15/03/2005
Time: 13:36:27
User: N/A
Computer: CARAMON
Description:
The Apache2 service terminated with service-specific error 1 (0x1).

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Sorry, just realised I'm in "invisible" mode - how rude. Apologies guys :(


__________________

I'm going to reverse the steps I took to install PHP and the uninstall the program.

Then I'll re-install and see how I get on.

Thanks to all for your help so far.

Aragorn 15-03-2005 13:49

Re: Server Questions - Anybody Feeling Brave?
 
Did some quick googling - one hit suggested :

Quote:

Anyway, to fix this issue, I would like to request you to add the following 2 lines in your web server httpd.conf configuration file.

open httpd.conf , go to the last lines and add
1. any alias directive to have some virtual directories .
for eg:
Alias /caspsamp "c:\Program Files\Sun ONE ASP\caspsamp
Another suggested you may get more troubleshooting info in the Apache error log rather than Windows Event logs.

HTH

Raistlin 15-03-2005 13:50

Re: Server Questions - Anybody Feeling Brave?
 
Ok, with all the changes to the conf files undone and the .dll files removed I can get the service to start again.

It must therefore be a problem with the way that PHP was set up.

I'll go back through the steps and see what happens. Maybe I naused something up last time.....

Richard M 15-03-2005 14:01

Re: Server Questions - Anybody Feeling Brave?
 
All you need to add to your default httpd.conf are these lines:
Quote:

LoadModule php4_module "c:/WINDOWS/php4apache2.dll"
AddType application/x-httpd-php .php

Raistlin 15-03-2005 14:10

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Richard M
All you need to add to your default httpd.conf are these lines:

Thanks Richard, your orginal text guide said:

Open up "c:\Apache2\conf\httpd.conf" in Notepad then add the following line at the bottom of the file:

LoadModule php4_module c:/windows/system32/php4apache2.dll
AddType application/x-httpd-php .php

Find this line:

DirectoryIndex index.html index.html.var

Change it to:

DirectoryIndex index.html index.php


Save and close the file.

Do I still need to do the DirectoryIndex bit?

TBH, I followed the text guide to the letter and everything stopped working:(

__________________

Is there anything I need to do before I start going through the changes in the text guide. I didn't actually go through the install.txt file that comes with PHP, maybe I missed something?

Richard M 15-03-2005 14:22

Re: Server Questions - Anybody Feeling Brave?
 
Aah yeah you will need the DirectoryIndex set to that, that doesn't affect the PHP installation though.
Have you tried with a standard PHP.ini copied to c:/windows/?

Raistlin 15-03-2005 14:24

Re: Server Questions - Anybody Feeling Brave?
 
Followed the steps:

Copy "php.ini-recommended" to "c:\windows", rename it to "php.ini" then open it up in Notepad.
Scroll roughly halfway down until you see: (etc)

Would it still work if I didn't modify the php.ini file at all?

Raistlin 15-03-2005 14:55

Re: Server Questions - Anybody Feeling Brave?
 
Solved it :D

It's this bit:

Quote:

Originally Posted by text guide
Save and close php.ini, navigate into "c:\php\extensions\", then copy "php_gd2.dll" to "c:\windows\system32\".
Also find the files "php4ts.dll" in the "c:\php\" directory, "php4apache.dll" in the "c:\php\sapi\" directory and copy them both to "c:\windows\system32\".
Almost there with PHP, all we have to do now is tell Apache to load PHP when it starts the webserver.

Open up "c:\Apache2\conf\httpd.conf" in Notepad then add the following line at the bottom of the file:

LoadModule php4_module c:/windows/system32/php4apache2.dll
AddType application/x-httpd-php .php

The LoadModule statement is asking for php4apache2.dll but the bit above it about copying the .dll files to the Windows\System32 directory says to copy php4apache.dll.

Copied the .dll file asked for in the LoadModule statement and now it appears to work ok (the phpinfo.php page is visible in the browser anyway ;) ).

Right, got to go and get on with the housework that I've been neglecting all day.

Thanks very much for the help guys. I'll be back later to learn about how to set up that Server Status thingy if you don't mind ;)

Thanks again.

Richard M 15-03-2005 15:47

Re: Server Questions - Anybody Feeling Brave?
 
I told you the article needed updating. :D
I'll do it when I have some free time.

Raistlin 15-03-2005 16:04

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Richard M
I told you the article needed updating. :D
I'll do it when I have some free time.

Tee Hee!

Never mind, good experience for me :D

I've managed to get the phpinfo.php page working and I've also got a server staus page working as well now (just created a new .php file and copied your earlier code into it).

I suppose I'd better have a good scout 'round the web and see what good resources I can find so I can start learning some of this myself. Expect more problems in the near future :D

Is there any way that I can get the server status page to upload automatically to my webspace (at certain times of the day)? I'm guessing that that would be a more secure way than allowing it to be available from the outside world?
I take it that in order to be able to access the page remotely I would need to forward Port 80 on my router and then type the address into the browser as http://<My Current IP Address>:80/serverstatus.php ?

Richard M 15-03-2005 16:26

Re: Server Questions - Anybody Feeling Brave?
 
Yep.
I have a static IP so have set up a DNS entry for mine.

Raistlin 15-03-2005 20:00

Re: Server Questions - Anybody Feeling Brave?
 
Ok then, here's the trick.

uptime.exe is working fine.
Apache is working fine.
PHP is working fine.

What is involved now in creating a file/page at specified times of the day and then uploading it to my webspace automatically?

And (there's always something else) if I wanted a line in my signature that said "My server has been online for....." where would I need to start in order to get that to work?
__________________

Quote:

Originally Posted by Richard M
Yep.
I have a static IP so have set up a DNS entry for mine.

If I've got two machines connected to my SACM via a router, how do I know which one the incoming connection will go to?

Obviously I don't want my Laptop trying to serve up web content, that would be a disaster :D
__________________

And another thing (God, don't I go on?), if somebody in the outside world were to type:

http://<My Current IP Address>:80/serverstatus.php

into their browser would Apache automatically supply them with the page, or can I assume that my router is blocking that request?

Richard M 15-03-2005 20:09

Re: Server Questions - Anybody Feeling Brave?
 
It would be blocking it unless you have port forwarded 80 to the internal IP of the server.
That's also how you'd know which machine the router will forward the requests to BTW. ;)

Regarding the sig thing, you'd need something like GD in PHP to do that.
http://uk.php.net/manual/en/function.imagecreate.php

Raistlin 15-03-2005 20:26

Re: Server Questions - Anybody Feeling Brave?
 
1 Attachment(s)
Quote:

Originally Posted by Richard M
It would be blocking it unless you have port forwarded 80 to the internal IP of the server.
That's also how you'd know which machine the router will forward the requests to BTW. ;)

Regarding the sig thing, you'd need something like GD in PHP to do that.
http://uk.php.net/manual/en/function.imagecreate.php

Thanks for that..... I'm way out of my depth though, I feel a trip to the library coming on.....

I take it that these scripts will create the image? How do I then link to that from my signature? Presumably I would either have to open the port on the router or find some way of getting the image to upload automatically.

Sorry about all of these questions.
__________________

Ok,fiddled with the PHP until I got this.....

All I need to do now is work out how to upload it to my webspace. I note that there are some php scripts that deal with FTP, I take it that I should be using one of those and then setting Task Sheduler to run it at the interval that I require?

Raistlin 15-03-2005 22:48

Re: Server Questions - Anybody Feeling Brave?
 
No good.

Had a good poke around the web and I can't seem to find anything that does the job.

There's plenty about forms for uploading images, I suppose I could tweak the code behind those, but what I really need to do is:

1. Server creates a .php or .html file and saves it
2. Server uploads that file to my web space (not on the server) at a specified time / at specified intervals
3. I can then use any browser to go to my website and see the resulting file, no need for me to leave the ports open on the router as the whole thing is a one way process from the server

Would really appreciate some help, even if it's just somebody telling me categorically that it can't be done.

One other option would be simply to have a script that runs the php code for generating the image above and then uploads it. I think the problem there is that I'm not sure that image creation thing can be done withot a browser actually requesting the page.....

Ohhhh... My head hurts..... :knock:

iron25 15-03-2005 23:52

Re: Server Questions - Anybody Feeling Brave?
 
I can't be bothered to read through everything again so could you explain exactly what you are wanting to do. From what I have speed read you want to just see a server status page but what info do you want to show. Depending on your answer I may have a suggestion. :)

Richard M 15-03-2005 23:54

Re: Server Questions - Anybody Feeling Brave?
 
Why all this emphasis on uploading to your webspace?
There's nothing wrong with hosting stuff on a home server you know. ;)

Anyway, that image you uploaded looks damn good to me, so what's the problem? :)

Raistlin 15-03-2005 23:58

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by iron25
I can't be bothered to read through everything again so could you explain exactly what you are wanting to do. From what I have speed read you want to just see a server status page but what info do you want to show. Depending on your answer I may have a suggestion. :)

Basically just want to upload a file to my webspace, file to be generated by the server in my room and uploaded automatically.
File should be capable of being rendered in an internet browser and basically just needs to give information about the status of the server. Namely, that it is still running and how long it has been running for.
__________________

Quote:

Originally Posted by Richard M
Why all this emphasis on uploading to your webspace?
There's nothing wrong with hosting stuff on a home server you know. ;)

I know, I know, I just don't like the thought of people being able to connect to the server from the outside world. Especially not with me being such a :dunce: and not being completely sure how secure it is.

Quote:

Originally Posted by Richard M
Anyway, that image you uploaded looks damn good to me, so what's the problem? :)

Yeah, the image is ok. Now if I could just figure out a way to get the server to recreate and then upload it for me at a specified time interval.......

<Shouldn't my Excel "help" assistant be popping up right about now to warn me that my formula contains a circular argument :D >

iron25 16-03-2005 00:00

Re: Server Questions - Anybody Feeling Brave?
 
Before we waste time on all this uploading to your webspace, why are you not willing to just access your own server from the world wide web. I can't see the point in installing apache and php and then refusing any access from the outside world. If the server is setup correctly then opening port 80 on your router will not be a problem and the server status page is already written for you. You can really secure a web server if you know what you are doing, the simplest approach would be to require authentication from the user.

Raistlin 16-03-2005 00:07

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by iron25
Before we waste time on all this uploading to your webspace, why are you not willing to just access your own server from the world wide web. I can't see the point in installing apache and php and then refusing any access from the outside world. If the server is setup correctly then opening port 80 on your router will not be a problem and the server status page is already written for you. You can really secure a web server if you know what you are doing, the simplest approach would be to require authentication from the user.

Ok, so that's probably the best way to go then.....

I don't want anybody to think I'm after all the answers without doing any work but I'm anxious to make sure I get this right (and having very little experience.....), after all the server will have all sorts of files on it, not just the web stuff.

Where's the best place to start with regard to securing the server?

I notice, for example, that when I load a webpage from it I can get to the root of the c:\Apache2\htdocs folder and view everything that is in there if I leave out the filename.

iron25 16-03-2005 00:12

Re: Server Questions - Anybody Feeling Brave?
 
In apache you can restrict access to just about everything from a single folder to a single file. A quick google should give loads of answers but a good starting point is:

http://httpd.apache.org/docs/howto/auth.html
__________________

As an example, I've setup apache so it restricts access based on IP address, any address not in the list will not be able to access anything.

Raistlin 16-03-2005 00:21

Re: Server Questions - Anybody Feeling Brave?
 
Thanks for that, I'll have a read tomorrow and see if I can make sense of it.

I take it that where it quotes commands to be entered, they can be entered directly in the command prompt?

Once again, thanks for the help.

iron25 16-03-2005 00:30

Re: Server Questions - Anybody Feeling Brave?
 
Don't forget that the commands are for a linux platform so they may differ slightly under windows but the actual command should be the same but just in case here is a link specifically for apache under windows:

http://sniptools.com/vault/windows-a...entication.htm

Raistlin 16-03-2005 00:46

Re: Server Questions - Anybody Feeling Brave?
 
Thanks for that, you're a star.

Off to bed now, will try those tomorrow - if WWIII starts you know I've done something slightly wrong :D

Cheers iron.

Millay 16-03-2005 01:45

Re: Server Questions - Anybody Feeling Brave?
 
Just a point of note, if you are going to be having exchange on this server, then you will probably want to access it from the outside world via http anyhow, as outlook web access is a killer app

good firewalls, security policies, no ftp server or telnet server running, and of course a fully patched machine, including apache php mysql etc. and you should be fine.

Raistlin 16-03-2005 11:49

Re: Server Questions - Anybody Feeling Brave?
 
Hi Maillay,

Thanks for that. I've got no intention of running Exchange on this server. It's purely for File/Printer/Web shares.

I wasn't even going to have the Web aspect available from outside the network but I have been convinced otherwise.

All I need to do now is get it secure.

Cheers.

Maggy 18-03-2005 21:19

Re: Server Questions - Anybody Feeling Brave?
 
Everyone who posted in this thread please look here.


http://www.cableforum.co.uk/board/sh...2&postcount=37


Incog. :clap:

Richard M 18-03-2005 21:38

Re: Server Questions - Anybody Feeling Brave?
 
I wish I could incog but I'm only allowed to use the team avatar. :(
Thanks for the recognition though. :)

Strzelecki 18-03-2005 21:39

Re: Server Questions - Anybody Feeling Brave?
 
Is http://robs.homelinux.co.uk the kind of thing you want? It shows the status and everything of my little server. If it's uptime you want in an image form to show on a remote website then try Sigx: http://sigx.yuriy.net/, you can run that on your server which will upload the stats to the sigx server an dynamically create an image while you can then call up on your webpage like:

https://www.cableforum.co.uk/images/local/2006/03/1.png

Maggy 19-03-2005 02:08

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Richard M
I wish I could incog but I'm only allowed to use the team avatar. :(
Thanks for the recognition though. :)

Then stick it in your profile space. :tu:

ooops I meant that in a most polite way.... ;)

dilli-theclaw 19-03-2005 10:47

Re: Server Questions - Anybody Feeling Brave?
 
I know it's a bit of a cheek barging on a thread - but you may all spank me later :)

I have a question tho.

Currently I have my fileserver upstairs running XP pro (also set up as a pvr)

Is it worth me running windows server 2003? Will I notice any difference?

All it does at the moment is share files and the printer oh and is my tv for the computer room.

Cheers :)

p.s. you may spank me now.

Richard M 19-03-2005 10:55

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by dilligaf1701
Is it worth me running windows server 2003? Will I notice any difference?

Nope.

JohnHorb 19-03-2005 10:57

Re: Server Questions - Anybody Feeling Brave?
 
I don't think there is any advantage in using Windows 2003 in a normal home network, unless you are using it as a means of investigating/evaluating the product, or running 'server' products such as IIS or Exchange. Just my opinion, though.

dilli-theclaw 19-03-2005 10:58

Re: Server Questions - Anybody Feeling Brave?
 
Quote:

Originally Posted by Richard M
Nope.

I had a feeling that was the case - oh well I thought I'd ask - cheers for that :)

Millay 19-03-2005 14:13

Re: Server Questions - Anybody Feeling Brave?
 
Thanks for the award yay.... been away for a few days....

Raistlin, howd you get on with securing your box?

I think you will b fine with a ptached machine and good firewall.. I guess if your feeling brave you could go for ISA Server or whatever its called from M$


All times are GMT. The time now is 02:15.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum