Host My Own Webpage - Steps & Software Needed

  • Thread starter Thread starter WWGD
  • Start date Start date
  • Tags Tags
    server
Click For Summary

Discussion Overview

The discussion revolves around the steps and software needed to host a personal webpage using a home PC as a server. Participants explore various software options, security considerations, and the technical requirements for setting up a server, including hardware specifications and ISP restrictions.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Conceptual clarification

Main Points Raised

  • Some participants suggest using Apache as a server software, while others propose alternatives like node.js for its lightweight nature.
  • Concerns are raised about security, with warnings about potential hacking attempts once a server is exposed to the internet.
  • Participants discuss the importance of having adequate hardware resources, including power supply, storage, RAM, and CPU capabilities, for running a reliable server.
  • There are suggestions about using non-standard ports to reduce the likelihood of intrusion attempts, with specific mention of port 11111 as a safer option.
  • Some participants mention that most ISPs may block certain ports or not allow residential users to run publicly accessible servers.
  • A participant notes that using software like Jupyter Notebook can allow a PC to function as a server locally, raising questions about client-server applications.
  • One participant suggests that using a professional website hosting service may be a safer and easier alternative.

Areas of Agreement / Disagreement

Participants express a range of views on the best software and methods for hosting a webpage, with no consensus on a single approach. Security concerns and ISP restrictions are acknowledged, but opinions vary on their implications and solutions.

Contextual Notes

Participants highlight limitations related to ISP policies, potential security vulnerabilities, and the need for specific hardware capabilities, which remain unresolved in the discussion.

WWGD
Science Advisor
Homework Helper
Messages
7,804
Reaction score
13,107
Hi all,
How can I use my own PC as a server so that I can host my own webpage? Do I need some special software for this?
 
Computer science news on Phys.org
  • Like
Likes   Reactions: WWGD
You will probably need to open a port on your router also. Be warned that the hackers will come as soon as you do.
 
  • Like
Likes   Reactions: WWGD
WWGD said:
Hi all,
How can I use my own PC as a server so that I can host my own webpage? Do I need some special software for this?

In addition to the above, if you want something close to a real web server (not just experimenting), your machine must have the resources to handle multiple requests at every instant, so a good reliable power supply, HD technology/available space, RAM and CPU technology/speed really matter. Be also prepared for some extra cooling as you must have continuous operation of the machine and good uptime stats. One other thing, related to what Borg said, is security measures you have to take.
 
  • Like
Likes   Reactions: WWGD
An alternative to Apache is node.js which is much lighter weight but extremely durable. You might need to learn a little javascript code to make it do what you want.

There are many tutorials online to show how to do this and here's one example:

https://blog.xervo.io/build-your-first-http-server-in-nodejs

and this one creating a simple static page web server:

https://gist.github.com/ryanflorence/701407

where if the web page exists it will return it.

Or more simply here are other means of creating a static server:

https://gist.github.com/willurd/5720255

One caveat is that these one-liner solutions may open your machine to hacking so be aware.

The python solution may already be on your machine if you have MacOS:

python -m SimpleHTTPServer 8000
 
Last edited:
  • Like
Likes   Reactions: WWGD
QuantumQuest said:
In addition to the above, if you want something close to a real web server (not just experimenting), your machine must have the resources to handle multiple requests at every instant, so a good reliable power supply, HD technology/available space, RAM and CPU technology/speed really matter. Be also prepared for some extra cooling as you must have continuous operation of the machine and good uptime stats. One other thing, related to what Borg said, is security measures you have to take.
If you're just starting out and don't have a lot of experience with security issues, you can use security through obscurity. I've been running a server on a Raspberry Pi 2 for over a year and I track intrusion attempts. One thing that I have clearly seen is that the script kiddies and corporations like Shodan go after specific common ports like 80, 8080, 443 and 8443. If you use an oddball port like 11111, the intrusions drop to nothing.
 
  • Like
Likes   Reactions: WWGD, QuantumQuest, jedishrfu and 1 other person
Borg said:
If you're just starting out and don't have a lot of experience with security issues, you can use security through obscurity. I've been running a server on a Raspberry Pi 2 for over a year and I track intrusion attempts. One thing that I have clearly seen is that the script kiddies and corporations like Shodan go after specific common ports like 80, 8080, 443 and 8443. If you use an oddball port like 11111, the intrusions drop to nothing.

Attention KMART shoppers may I direct your attention to port # 11111!

There are quite a few other ports that they could check for too:

https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

and 11111 is on it.
 
  • Like
Likes   Reactions: Borg
  • Like
Likes   Reactions: jedishrfu
Borg said:
Nice list. I just picked one out of the air that I hadn't used before.
I think you're right though , it unlikely that they would find it but as their database of connected devices increases and as people start to do the same trick they might extend their scan. Also if they somehow find a more common port open but can't find anything interesting, they might poke around looking at other ports.

So the best approach is to not have the server operational 24/7 but only when needed and to turn if off or terminate the server app when not in use.
 
  • #10
jedishrfu said:
I think you're right though , it unlikely that they would find it but as their database of connected devices increases and as people start to do the same trick they might extend their scan. Also if they somehow find a more common port open but can't find anything interesting, they might poke around looking at other ports.

So the best approach is to not have the server operational 24/7 but only when needed and to turn if off or terminate the server app when not in use.
From what I can tell, they just walk through the ip addresses sequentially and hit the same port every time. If they have to then check dozens (or thousands) of ports, that doesn't allow them to search much of the web. I left my server running on an odd port for a month last year and didn't get a single intrusion attempt.

BTW, Shodan is my biggest annoyance. They have dozens of servers spread out between Europe, Chicago and San Diego. If you block one IP, the others try just to make sure they can still find you. Even the Chinese and the Russians aren't that persistent.
 
  • #11
  • Like
Likes   Reactions: Borg
  • #13
Most ISPs will forbid this activity by blocking port 80 and not assigning you a static IP. You can run a web server on your computer but it won't be accessible to the outside.
 
  • Like
Likes   Reactions: QuantumQuest
  • #14
If you're using a home computer and you're in the US, check your ISP's terms of service. They very likely forbid publicly accessible servers on residential (not business) service plans.
 
  • #15
Borg said:
From what I can tell, they just walk through the ip addresses sequentially and hit the same port every time. If they have to then check dozens (or thousands) of ports, that doesn't allow them to search much of the web.

From what I've read at times in papers/stats - internet security is one of the fields that keeps me interested for a long time, it really depends on whom you have to do with. Some script kiddies or amateur hackers they do this for fun and yes they usually work their way sequentially, hitting the same port(s). But there are guys that launch some sophisticated port scanners that they can go even to the point, that this is almost invisible. Of course, this is no warning for the OP, as these intrusion attempts are aimed to steal/modify very valuable resources. It is very unlikely that this going to happen to some small server out there, at random - but who knows?:)).
 
  • #16
Greg Bernhardt said:
Most ISPs will forbid this activity by blocking port 80 and not assigning you a static IP. You can run a web server on your computer but it won't be accessible to the outside.

And this is also a very fair point not previously mentioned. This is something to be discussed and dealt with your ISP.
 
  • #17
Thanks all, I am kind of curious; don't know if this is dumb: despite not having Apache or any other server software installed, I seem to somehow be using my PC as a server when using the Anaconda package (Jupyter Notebook as the interface), I am using it as a local host in port 8888. What gives? EDIT: Am I not running a client-server application in which I am using my own PC (meaning PC software) in the role of the server?
 
Last edited:
  • #18
It may be safer and easier to use a website hosting service . The BT service that I use professionally provides excellent set up help and has draconian hacker defences .
 
  • #19
WWGD said:
Thanks all, I am kind of curious; don't know if this is dumb: despite not having Apache or any other server software installed, I seem to somehow be using my PC as a server when using the Anaconda package (Jupyter Notebook as the interface), I am using it as a local host in port 8888. What gives? EDIT: Am I not running a client-server application in which I am using my own PC (meaning PC software) in the role of the server?

The Jupyter Notebook App you use, is a server-client application in which through your web browser, you can edit or run notebook documents. Now, this app can be executed on your local machine, having no internet access or alternatively be installed on a remote machine and accessed through internet. In any case, there is some server software listening to some port (e.g. 8888) and also some client software communicating with it, for the purposes of the Jupyter app. The code contained in a Notebook document is executed by a kernel, that is launched automatically when you open a such document. In your case this is the ipython kernel for the python language.
 
  • Like
Likes   Reactions: WWGD
  • #20
WWGD said:
Am I not running a client-server application in which I am using my own PC (meaning PC software) in the role of the server?
You can do the same thing if you run Apache on your own PC. It will serve web pages from your disk to your web browser via port 80 (by default). I use this for testing changes to my website before uploading them to my web-hosting service. I keep a complete copy of my website on my Mac for this purpose. It also serves as a backup to the online copy. The pages are under my user account, so I access them with URLs starting with http://localhost/~jtbell/ . I can also access them from other devices on my local network, using the IP address shown in my Mac's System Preferences: http://192.168.0.2/~jtbell/ . I just tried it on my iPhone, using my local WiFi network. But nobody outside my local network can get to them, I think. At least I can't see any evidence of it in my Apache log files.
 
  • #21
Web hosting is dirt cheap these days, but there's still a bit of a geek factor in running a site off your own DSL/cable home connection.
  • First, you need to find your IP address.
  • You'll need to point the domain name to that IP address
  • configure a web server on your computer. Apache, Nginx, IIS, whatever you prefer.
Consider this issues.
  • IP address changes
  • Blocks port 80
  • security of network and system
Regards,
Christian
Network Admin
 
  • Like
Likes   Reactions: WWGD
  • #22
ManYou said:
Web hosting is dirt cheap these days, but there's still a bit of a geek factor in running a site off your own DSL/cable home connection.
  • First, you need to find your IP address.
  • You'll need to point the domain name to that IP address
  • configure a web server on your computer. Apache, Nginx, IIS, whatever you prefer.
Consider this issues.
  • IP address changes
  • Blocks port 80
  • security of network and system
Regards,
Christian
Network Admin
Thank you for your spam setup post, ManYou. Would you like to post your link now so our SpamBot can deal with it?
 
  • Like
Likes   Reactions: Borg and jedishrfu
  • #23
berkeman said:
Thank you for your spam setup post, ManYou. Would you like to post your link now so our SpamBot can deal with it?
??
 
  • Like
Likes   Reactions: berkeman
  • #24
WWGD said:
??
The latest tactic of spammers is to create an account, come back a few days later, and ask an 'innocent' question. Then, a new account is created a few days or even weeks later to 'answer' the question with links to the site that they want to promote. In each case, neither of the accounts is ever logged into again. Seems like a lot of work to have your posts deleted.
 
  • Like
Likes   Reactions: berkeman and WWGD
  • #25
Borg said:
The latest tactic of spammers is to create an account, come back a few days later, and ask an 'innocent' question. Then, a new account is created a few days or even weeks later to 'answer' the question with links to the site that they want to promote. In each case, neither of the accounts is ever logged into again. Seems like a lot of work to have your posts deleted.
But s/he did not ask a question that I could tell, s/he just replied to mine.
 
  • #26
WWGD said:
But s/he did not ask a question that I could tell, s/he just replied to mine.
I guess they decided to keep the first step. The follow on post will probably quote that one and provide some 'helpful' links.
 
  • Like
Likes   Reactions: WWGD
  • #27
BTW, this tactic was just used by a different user in another thread. They buried their spam link in one of their helpful replies, and they are now banned. Very sneaky sometimes...
 
  • #28
berkeman said:
BTW, this tactic was just used by a different user in another thread. They buried their spam link in one of their helpful replies, and they are now banned. Very sneaky sometimes...
I see. I thought you believed I was going to sneak on PF very slowly, over some 8 years and 2400 posts , after which I would plant my spam.;).
 
  • Like
Likes   Reactions: berkeman

Similar threads

  • · Replies 11 ·
Replies
11
Views
1K
Replies
7
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
3
Views
869
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 8 ·
Replies
8
Views
4K