Host My Own Webpage - Steps & Software Needed

  • Thread starter WWGD
  • Start date
  • Tags
    server
In summary: They would need to come up with some kind of more sophisticated approach.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... anything. They would need to come up with some kind of more sophisticated approach.
  • #1
WWGD
Science Advisor
Gold Member
7,010
10,469
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
  • #3
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 WWGD
  • #4
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 WWGD
  • #5
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 WWGD
  • #6
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 WWGD, QuantumQuest, jedishrfu and 1 other person
  • #7
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 Borg
  • #8
  • Like
Likes jedishrfu
  • #9
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 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 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 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 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 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 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 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 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 berkeman

1. What are the necessary steps to host my own webpage?

The necessary steps to host your own webpage are:

  • 1. Choose a domain name and register it with a domain registrar
  • 2. Choose a web hosting service and sign up for a hosting plan
  • 3. Design and build your website using HTML, CSS, and JavaScript
  • 4. Upload your website files to the web hosting server through an FTP client
  • 5. Test your website to ensure it is working properly and make any necessary updates

2. What is a domain name and why is it important?

A domain name is the unique address of your website on the internet. It is important because it allows users to easily find and access your website. It also helps establish your online identity and brand.

3. What is web hosting and why do I need it?

Web hosting is a service that allows individuals or organizations to make their website accessible on the internet. Web hosting companies provide server space, storage, and bandwidth to store and serve website files to users who visit the website.

4. What software do I need to host my own webpage?

To host your own webpage, you will need a web browser to access and view your website, a text editor or web development software to create and edit your website files, and an FTP client to transfer your website files to the hosting server. You may also need other software depending on the specific features and functionality you want on your website.

5. Can I host my own webpage without any technical knowledge?

While it is possible to host your own webpage without any technical knowledge, it is recommended to have at least a basic understanding of web development and hosting. This will help you troubleshoot any issues that may arise and make updates to your website as needed. There are also many resources available online to help guide you through the process of hosting your own webpage.

Similar threads

Replies
7
Views
243
  • Computing and Technology
Replies
6
Views
1K
  • Computing and Technology
Replies
7
Views
534
  • Computing and Technology
Replies
8
Views
420
  • Computing and Technology
Replies
15
Views
1K
  • Computing and Technology
Replies
4
Views
1K
  • Computing and Technology
Replies
11
Views
1K
  • Computing and Technology
Replies
13
Views
2K
  • Programming and Computer Science
Replies
7
Views
489
  • Programming and Computer Science
Replies
28
Views
735
Back
Top