Server Questions - Anybody Feeling Brave?
15-03-2005, 16:04
|
#61
|
|
Inactive
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
|
Re: Server Questions - Anybody Feeling Brave?
Quote:
|
Originally Posted by Richard M
I told you the article needed updating. 
I'll do it when I have some free time.
|
Tee Hee!
Never mind, good experience for me
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
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 ?
|
|
|
15-03-2005, 16:26
|
#62
|
|
Inactive
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
|
Re: Server Questions - Anybody Feeling Brave?
Yep.
I have a static IP so have set up a DNS entry for mine.
|
|
|
15-03-2005, 20:00
|
#63
|
|
Inactive
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
|
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 
__________________
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?
|
|
|
15-03-2005, 20:09
|
#64
|
|
Inactive
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
|
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
|
|
|
15-03-2005, 20:26
|
#65
|
|
Inactive
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
|
Re: Server Questions - Anybody Feeling Brave?
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?
|
|
|
15-03-2005, 22:48
|
#66
|
|
Inactive
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
|
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.....
|
|
|
15-03-2005, 23:52
|
#67
|
|
Inactive
Join Date: Aug 2003
Location: nowhere
Posts: 718
|
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.
|
|
|
15-03-2005, 23:54
|
#68
|
|
Inactive
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
|
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?
|
|
|
15-03-2005, 23:58
|
#69
|
|
Inactive
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
|
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  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  >
|
|
|
16-03-2005, 00:00
|
#70
|
|
Inactive
Join Date: Aug 2003
Location: nowhere
Posts: 718
|
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.
|
|
|
16-03-2005, 00:07
|
#71
|
|
Inactive
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
|
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.
|
|
|
16-03-2005, 00:12
|
#72
|
|
Inactive
Join Date: Aug 2003
Location: nowhere
Posts: 718
|
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.
|
|
|
16-03-2005, 00:21
|
#73
|
|
Inactive
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
|
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.
|
|
|
16-03-2005, 00:30
|
#74
|
|
Inactive
Join Date: Aug 2003
Location: nowhere
Posts: 718
|
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
|
|
|
16-03-2005, 00:46
|
#75
|
|
Inactive
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
|
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
Cheers iron.
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 05:17.
|