Programming a Host Server

scienceguy

Solid State Member
Messages
16
Hi, I think this is in the right forum.
I want to begin programming on my own server, but it has to display the site on remote computers aswell, so that it is properly hosting it. How can I achieve this? Do I use sockets or something else?

Im prepared to use the following languages (there order is the prority to program in it - so I want to use WSH but I can use the other 2); (Im using a hypertext application at first but I will adapt it in the future):
  1. Windows Script Host
  2. JavaScript
  3. Visual Basic Script
Please reply if you know how to do this, if its not possible in those languages but is in another plese tell me what language and how to do it, I will learn the language. I cannot use Java because i've tried before to start learning but I can't seem to use javac and java to compile and run the programs. If you know how to setup java please tell me.
Note: I can't start using a language which costs money to use, such as python.
 
I'm not really sure that i fully understand the question...

You want to start programming, but you want to use wsh/js/vbs and have them in a web page, (that's great) the wsh and vbs make up activeX controls, so don't be surprised if they either dno't work in firefox, or only half work or are blocked in IE.

you host the pages all you need is a web server, the scripts are all interperated at the client side...
infact you could use any free hosting package to do what you are attempting...

vbs and wsh can be used to make simple applications and easy scripts to ake things a little easier for you on your home PC as well. so if you don't have a lot of luck with web uses for these you could always try making a simple program to do a series of tasks.
 
root said:
infact you could use any free hosting package to do what you are attempting...

I don't relly want to use free hosting packages because you have limited webspace and you probably can't admionister the server very well. Theres also the risk of them updating their software so that your scripts don't work and uploading your files isn't as quick as creating them on the server pc itself.
If a server can only be achieved by creating an actual application, please show me how using free tools I can achieve this.
 
OK...

first things first...
you want to use your server as a web server,
what OS are you using?
and do you have any web serving software installed?
 
root said:
OK...

first things first...
you want to use your server as a web server,
what OS are you using?
and do you have any web serving software installed?

Im using Windows XP SP2 and I have PHP 5, Perl and MySQL 5.0.22 running on Apache 2.
 
Vista Master said:
try typing in your ip in your web browser, you can get your ip from www.whatsmyip.net - then see what comes up and tell us.

When I typed in my IP to the address it couldnt find it - DNS Error. I tried http://---.---.---.---/ (Ive forgotten the ip, I copied and pasted it into the address bar) and it still couldn't find it.

EDIT: My ip is deleted -root
 
damn... probably didn't get ther fast enough on that one...

science guy, not that it's absolutly definitly going to be a problem for you, but it's always best to try to guard your IP address... there are these idiots out there on the web with tools that need an IP address before they can attempt to hack you, I.e they have a tool that will try all (or some) known exploits for a system on any given address. (so if your firewall logs reported a lot of activity last might, then you'll know why!).
unless you physicaly want us, (us as in the rest of the world) to look at something you're doing try to keep that a bit more closly guarded.

if you look at the machine that is the server from your computer (I'm assuming they are different machines). what do you see? or try going on the actual server machine and navigating to http://localhost

i.e if the servers IP address on your network is 192.168.0.1 type that into the address bar, if it's called myserver try typing that into the address bar, if you are on the server type localhost in the address bar, or type 127.0.0.1

you should see a welcome to the apache server web page.

if you see that then you should be ready to start adding pages to your 'site', when I say pages I mean that all the scripts that you will be working on will be contained within HTML pages. in the following manner.

that welcome to apache web page is in c:\program files\apache group\apache2\htdocs

but if you look in the file
c:\program files\apache group\apache2\conf\httpd.conf you can change the directory that apache looks at to find web pages.

try this page to get you started in vbscript in a web page.
Code:
<html>
<SCRIPT LANGUAGE="VBScript"> 
<!--
msgbox "HELLO!"
-->
</script>
</html>
 
root said:
damn... probably didn't get ther fast enough on that one...

science guy, not that it's absolutly definitly going to be a problem for you, but it's always best to try to guard your IP address... there are these idiots out there on the web with tools that need an IP address before they can attempt to hack you, I.e they have a tool that will try all (or some) known exploits for a system on any given address. (so if your firewall logs reported a lot of activity last might, then you'll know why!).
unless you physicaly want us, (us as in the rest of the world) to look at something you're doing try to keep that a bit more closly guarded.

if you look at the machine that is the server from your computer (I'm assuming they are different machines). what do you see? or try going on the actual server machine and navigating to http://localhost

i.e if the servers IP address on your network is 192.168.0.1 type that into the address bar, if it's called myserver try typing that into the address bar, if you are on the server type localhost in the address bar, or type 127.0.0.1

you should see a welcome to the apache server web page.

if you see that then you should be ready to start adding pages to your 'site', when I say pages I mean that all the scripts that you will be working on will be contained within HTML pages. in the following manner.

that welcome to apache web page is in c:\program files\apache group\apache2\htdocs

but if you look in the file
c:\program files\apache group\apache2\conf\httpd.conf you can change the directory that apache looks at to find web pages.

try this page to get you started in vbscript in a web page.
Code:
<html>
<SCRIPT LANGUAGE="VBScript"> 
<!--
msgbox "HELLO!"
-->
</script>
</html>

Thanks, Ive already added files to my apache server, but would the only way to host my files on the web via my computer be to buy some hardware, or is it possible with a home computer by getting software?
 
no, you can host files on your computer to the rest of the world...

I'll assume that you have either a modem attached to your server computer, (which is then conected to some sort of network for any other computers in your house).

all you need to do is open port 80 on your firewall and have it directed to your server machine, (this would either be in your firewall settings, (windows firewall or any other firewall program).

assuming that you have a hardware router then there should be some sort of settings on the router, (usually accessed via a web interface) that will let you make port 80 point to your server...


for an address that is easier to remember than your IP address (and one that won't change) check out www.no-ip.com it's free, easy to set up domain names (e.g www.scienceguy.no-ip.com) that point to your computer rather than some random free web space.
 
Back
Top Bottom