Jump to content

Hello, I am a student and I'm currently taking a web-development course in which we learn how to "code" our own websites 

(later down the course we will gain access to the schools server network and host our websites online)

 

But my question is how can I actually host my full websites with images,css,js etc. I know how to setup a domain name and some sort of free hosting service just to test things out.

 

Tried it today but my webpage look awful with broken images no formatting etc.

Link to comment
https://linustechtips.com/topic/672336-hosting-website/
Share on other sites

Link to post
Share on other sites

16 minutes ago, David Nilsson said:

Hello, I am a student and I'm currently taking a web-development course in which we learn how to "code" our own websites 

(later down the course we will gain access to the schools server network and host our websites online)

 

But my question is how can I actually host my full websites with images,css,js etc. I know how to setup a domain name and some sort of free hosting service just to test things out.

 

Tried it today but my webpage look awful with broken images no formatting etc.

 

I use a host called https://www.hostinger.co.uk/ I have my blog hosted on their free tier and it runs ok upgraded to paid would increase that but as I make no money and receive very little traffic it is not worth it for me.

 

You just use their web based file manager to upload a ZIP of your files and then upzip them once on the server or you can use a FTP client to send the files that way.

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
https://linustechtips.com/topic/672336-hosting-website/#findComment-8664749
Share on other sites

Link to post
Share on other sites

1 minute ago, vorticalbox said:

I use a host called https://www.hostinger.co.uk/ I have my blog hosted on their free tier and it runs ok upgraded to paid would increase that but as I make no money and receive very little traffic it is not worth it for me.

 

You just use their web based file manager to upload a ZIP of your files and then upzip them once on the server or you can use a FTP client to send the files that way.

Okay sounds nice (done something similar but on a different website) but in my html code, document or whatever it is called I have a button which links back to the front page (I have a few more buttons but I'm using this an example)

 

it looks like this <li style="float:left"><a href="C:\Users\David\Documents\NetBeansProjects\BildGalleri\public_html\index.html">Home</a></li>

 

how would I go about formatting that since it can't refer back to that file since it is on my pc, or am I wrong? 

Link to comment
https://linustechtips.com/topic/672336-hosting-website/#findComment-8664783
Share on other sites

Link to post
Share on other sites

4 minutes ago, David Nilsson said:

Okay sounds nice (done something similar but on a different website) but in my html code, document or whatever it is called I have a button which links back to the front page (I have a few more buttons but I'm using this an example)

 

it looks like this <li style="float:left"><a href="C:\Users\David\Documents\NetBeansProjects\BildGalleri\public_html\index.html">Home</a></li>

 

how would I go about formatting that since it can't refer back to that file since it is on my pc, or am I wrong? 

just give it a relative address instead of an absolute one.

The best way to measure the quality of a piece of code is "Oh F*** "s per line

Link to comment
https://linustechtips.com/topic/672336-hosting-website/#findComment-8664802
Share on other sites

Link to post
Share on other sites

5 minutes ago, David Nilsson said:

how would I go about formatting that since it can't refer back to that file since it is on my pc, or am I wrong? 

You're right, that path is local, so the web server wouldn't know where to find that file. Instead of using absolute paths (like you did) use relative ones. For example:

<li style="float:left"><a href="public_html\index.html">Home</a></li>

This will instruct the web server to look in the current folder for a subfolder called "public_html" and inside that a file called "index.html"

Link to comment
https://linustechtips.com/topic/672336-hosting-website/#findComment-8664816
Share on other sites

Link to post
Share on other sites

I run WAMP on my PC and use no-ip to redirect a domain name to my computer's IP.

Both services are free.

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
https://linustechtips.com/topic/672336-hosting-website/#findComment-8664821
Share on other sites

Link to post
Share on other sites

15 minutes ago, vorticalbox said:

I use a host called https://www.hostinger.co.uk/ I have my blog hosted on their free tier and it runs ok upgraded to paid would increase that but as I make no money and receive very little traffic it is not worth it for me.

 

You just use their web based file manager to upload a ZIP of your files and then upzip them once on the server or you can use a FTP client to send the files that way.

Okay sounds nice (done something similar but on a different website) but in my html code, document or whatever it is called I have a button which links back to the front page (I have a few more buttons but I'm using this an example)

 

it looks like this <li style="float:left"><a href="C:\Users\David\Documents\NetBeansProjects\BildGalleri\public_html\index.html">Home</a></li>

 

how would I go about formatting that since it can't refer back to that file since it is on my pc, or am I wrong? 

2 minutes ago, Enderman said:

I run WAMP on my PC and use no-ip to redirect a domain name to my computer's IP.

Both services are free.

I am trying out WAMP atm (just installed it and setting things up) we'll see how this goes

Link to comment
https://linustechtips.com/topic/672336-hosting-website/#findComment-8664833
Share on other sites

Link to post
Share on other sites

4 minutes ago, Lehti said:

You're right, that path is local, so the web server wouldn't know where to find that file. Instead of using absolute paths (like you did) use relative ones. For example:


<li style="float:left"><a href="public_html\index.html">Home</a></li>

This will instruct the web server to look in the current folder for a subfolder called "public_html" and inside that a file called "index.html"

okay thanks for explaining it (y) 

Link to comment
https://linustechtips.com/topic/672336-hosting-website/#findComment-8664835
Share on other sites

Link to post
Share on other sites

6 minutes ago, Enderman said:

I run WAMP on my PC and use no-ip to redirect a domain name to my computer's IP.

Both services are free.

Just remember that you need to renew no-ip every 30 days, or your dynamic DNS will expire. An alternative to Apache is IIS. I personally have never used it, but the guys at Secunia think it's become very secure.

Link to comment
https://linustechtips.com/topic/672336-hosting-website/#findComment-8664851
Share on other sites

Link to post
Share on other sites

7 minutes ago, Lehti said:

Just remember that you need to renew no-ip every 30 days, or your dynamic DNS will expire. An alternative to Apache is IIS. I personally have never used it, but the guys at Secunia think it's become very secure.

not very technical yet but thanks for the tip, not really sure what direction I wanna take with my website mostly just school stuff on it atm 

but I've got a fairly decent page layout for just being a beginner https://gyazo.com/84b3444daa8321e234274514cba4c64d

Link to comment
https://linustechtips.com/topic/672336-hosting-website/#findComment-8664889
Share on other sites

Link to post
Share on other sites

1 hour ago, David Nilsson said:

I am trying out WAMP atm (just installed it and setting things up) we'll see how this goes

It's a bit complicated to set up, took me a few days and a lot of googling, but now it works flawlessly and I love it :) 

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
https://linustechtips.com/topic/672336-hosting-website/#findComment-8665019
Share on other sites

Link to post
Share on other sites

Just now, Enderman said:

It's a bit complicated to set up, took me a few days and a lot of googling, but now it works flawlessly and I love it :) 

just got done with the easy part of moving my files to the www folder now I just need to figure out how to get this up and running and accessible 

Link to comment
https://linustechtips.com/topic/672336-hosting-website/#findComment-8665024
Share on other sites

Link to post
Share on other sites

You'll need a Dynamic DNS provider. AFAIK No-IP is the only service that's currently free (DynDNS used to be free as well, but not anymore for a few years now). To put it simply, your router gets a random IP address every time you connect to the Internet (basically, every time you reboot it or turn it off and then on again. A Dynamic DNS provider provides you with a small executable that communicates your new IP periodically and allows your web server to be accessed with a friendly name (usually of the type yourhost.no-ip.com).

You should also tweak a few settings in your router's configuration (accessible through the IP 192.168.0.1, generally) to open port 80. If your ISP blocks port 80, you should open port 8080.

It may be a good idea to add a server exposed to the world to the Demilitarized Zone (DMZ).

Note that some routers don't support NAT loopback, i.e. won't allow you to connect to your own public IP from your public IP.

Link to comment
https://linustechtips.com/topic/672336-hosting-website/#findComment-8665058
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×