RaspiFanBoy
Posts: 17
Joined: Sun Aug 16, 2020 9:09 am

Making website

Sat Oct 03, 2020 1:07 pm

Hey Guys. If i have a html file, (a website) how can i make it to a website? I mean there is no project that really shows how to have a website with a domain name and these things. Sry for my bad english

User avatar
neilgl
Posts: 2669
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: Making website

Sat Oct 03, 2020 4:52 pm

Use the tutorial here to make a web server etc. https://projects.raspberrypi.org/en/pr ... -wordpress Then to get it onto the internet you will need to get a domain name (some are free, I bought a cheap one) that links that name to the ip address of your router. The router than forwards port 80 (and 443) to your pi.
The html file you already have can be a page on the website (in the directory used by apache2)

deepo
Posts: 713
Joined: Sun Dec 30, 2018 8:36 pm
Location: Denmark

Re: Making website

Sat Oct 03, 2020 10:42 pm

One way of doing this would be to obtain a domain name of your choice.
One of the things you'll need to provide is which DNS server that will answer for your new domain.
You can also register a new domain from a web hotel service, that's what I've done.
I have then obtained a static IP address from my internet provider, and created a DNS record for a subdomain of my domain and has that point to my static IP address.
Example: Let's say the mydomain.com resides with a web hotel that hosts my web pages. I have then added a DNS record there to point e.g. rpi.mydomain.com to point to my static IP address.
My static IP address is a router supplied by my internet provider.
I have then created a port forward in the router for the http port 80 to the IP address of my RPi.
And I have setup a web server as described here:
https://www.raspberrypi.org/documentati ... /apache.md

That way my web page hosted on my RPi is available as http://rpi.mydomain.com

Hope that answers some of your questions.

/Mogens

User avatar
rpdom
Posts: 18170
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Making website

Sun Oct 04, 2020 8:05 am

deepo wrote:
Sat Oct 03, 2020 10:42 pm
You can also register a new domain from a web hotel service, that's what I've done.
I'm guessing you meant a "web hosting service"?

For DNS I run my own DNS servers (just a couple of Virtual servers at $6/month each). I can then update those to point at my home external IP address if I chose whenever it changes. I just set the DNS on my domain registrar to point to my servers.

(Actually, I have my servers connected vi VPN as well, so I don't need port forwarding to get to my home website, I can just proxy it from the servers via the VPN).

I'm considering offering a basic DNS service to a few Pi users. To start with it would just be to point your DNS at my servers and let me know your domain and IP and I'll set it up. Later I may look at a secure web interface.
I'm not looking to charge for this (yet, but i I did it would be a small amount). If anyone is interested just let me know here and we'll work things out.
Unreadable squiggle

User avatar
neilgl
Posts: 2669
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: Making website

Sun Oct 04, 2020 9:31 am

When I bought the cheap domain name, it included the DNS service of course.

deepo
Posts: 713
Joined: Sun Dec 30, 2018 8:36 pm
Location: Denmark

Re: Making website

Sun Oct 04, 2020 2:46 pm

rpdom wrote:
Sun Oct 04, 2020 8:05 am
deepo wrote:
Sat Oct 03, 2020 10:42 pm
You can also register a new domain from a web hotel service, that's what I've done.
I'm guessing you meant a "web hosting service"?
Yes, that's what I meant. The hotel part is a Danish "translation".

/Mogens

peppe8o
Posts: 21
Joined: Sun Apr 07, 2019 9:57 am
Contact: Website Twitter

Re: Making website

Sun Oct 04, 2020 7:19 pm

Hi, I suppose you want to publish your page in internet (not only for your home network).
Following lines are checks to verify:
  • You need a public IP (-> ask your internet provider if they give it to customers, better if it is public AND static IP)
  • You need to be able to admin your router (-> otherwise you need to ask who manage it for following points no. 1 and 2)
Tasks list:
  • Assign Raspberry PI a static IP address in internal network, both on router and on RPI configuration (at least on router)
  • Configure port forwarding on router, port 80 for HTTP and port 443 for HTTPS, to your Raspberry PI
  • Configure a domain pointing your public IP address (maybe also a free "second level" domain)
  • Install LAMP server on Raspberry PI
  • Copy your html files under /var/www/html folder
Please find below some useful tutorials for these tasks:

User avatar
neilgl
Posts: 2669
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: Making website

Sun Oct 04, 2020 10:51 pm

I would just follow the raspberrypi.org links, not some random other stuff....

Return to “Beginners”