![]() |
Re: Server Questions - Anybody Feeling Brave?
Quote:
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 ? |
Re: Server Questions - Anybody Feeling Brave?
Yep.
I have a static IP so have set up a DNS entry for mine. |
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:
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? |
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 |
Re: Server Questions - Anybody Feeling Brave?
1 Attachment(s)
Quote:
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? |
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: |
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. :)
|
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? :) |
Re: Server Questions - Anybody Feeling Brave?
Quote:
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:
Quote:
<Shouldn't my Excel "help" assistant be popping up right about now to warn me that my formula contains a circular argument :D > |
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.
|
Re: Server Questions - Anybody Feeling Brave?
Quote:
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. |
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. |
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. |
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 |
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. |
| All times are GMT. The time now is 03:16. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum