Jump to content

Hosting my HTML Project

BrownZeus

Hey guys,

 

So I have an HTML poject for school. I wanna just be able to upload my entire project folder so the relative paths will remain true, and contain my videos and pictures for the project as well. Any website hosting services that do that? Cause Google Sites does not, and neither does squarespace

 

Or should I just use a spare computer to host a website myself using something like no-ip? Literally the site needs to be up for like a day total for the project and thats it

Link to comment
Share on other sites

Link to post
Share on other sites

WAMP for Windows or LAMP for Linux

Forward port 80 to the server

Dump folder in WWWRoot folder

Enable Stack

Navigate to "yourexternaliphere"/"foldernamehere" in your web browser

 

Could also use a dynamic DNS to get a hostname but that's optional.

 

Be warned though, the thing will be about as secure as an open door so use either sandboxing or VM to stop hackers from breaking out into your PC.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

you can turn any pc into a webserver and then just upload the folder.

I have a webserver running on a raspberry pi 2B using Apache2, but other hosting software and hardware will also work.

 "Aeneas troianus est."

I'm allergic to social interaction in real life, don't talk to me in real life please.

don't forget to quote or tag (@marten.aap2.0) me when you reply!

Link to comment
Share on other sites

Link to post
Share on other sites

I'll look into appengine, but I would prefer something like wix or wordpress where I can instead just upload my entire project folder so that the images are hosted locally, so that naturally, my local file calls for the images hold true. 

Link to comment
Share on other sites

Link to post
Share on other sites

That's how it works, you just run a command and it uploads the entire folder to their servers and it's immediately available

Link to comment
Share on other sites

Link to post
Share on other sites

Github lets you host and update sites now as well. Nothing too complex (server-side scripts aren't allowed) but, for static sites its great.

I found these helpful.

How to host a website with Github - YouTube

GitHub Pages | Websites for you and your projects, hosted directly ...

Getting Started with GitHub Pages · GitHub Guides

 

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/19/2017 at 2:59 PM, BrownZeus said:

so the relative paths will remain true, and contain my videos and pictures for the project as well

They do remain true if you're linking them properly...

If you open your local doc in chrome you can't use hrefs, srcs, etc from /path/to/src, instead ./ for this dir -> path to and ../ for up 1 dir then path, also just path/to/src for this dir -> path to

i want to die

Link to comment
Share on other sites

Link to post
Share on other sites

Commercial web hosting can be had for literally a penny a day. The price for minimum entry dedicated servers is also dirt cheap and competitive. In fact, AWS has the free tier and... someone else has already mentioned Google's option.

Link to comment
Share on other sites

Link to post
Share on other sites

22 hours ago, Lumi said:

They do remain true if you're linking them properly...

If you open your local doc in chrome you can't use hrefs, srcs, etc from /path/to/src, instead ./ for this dir -> path to and ../ for up 1 dir then path, also just path/to/src for this dir -> path to

The links I'm using are file paths, not urls. So my relative paths won't work if the files aren't stored in the root of the site.

 

 

With that being said, my group and I just pooled $20 and are hosting on go daddy via cpanel.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, BrownZeus said:

The links I'm using are file paths, not urls. So my relative paths won't work if the files aren't stored in the root of the site.

 

 

With that being said, my group and I just pooled $20 and are hosting on go daddy via cpanel.

>filepaths

they dont have to be in the root on ur local either because ../../  

......

i want to die

Link to comment
Share on other sites

Link to post
Share on other sites

39 minutes ago, Lumi said:

>filepaths

they dont have to be in the root on ur local either because ../../  

......

I'm aware of this. But again, file paths are useless if I don't know where the files are stored. Hence why I was asking if there was a site similar to squarespace or soemthing that would let me host files as well.

 

And again, to circumvent that I've just opted to go with Go Daddy hosting cause essentially they're just running the site on a Linux VM on their servers.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, BrownZeus said:

I'm aware of this. But again, file paths are useless if I don't know where the files are stored. Hence why I was asking if there was a site similar to squarespace or soemthing that would let me host files as well.

 

And again, to circumvent that I've just opted to go with Go Daddy hosting cause essentially they're just running the site on a Linux VM on their servers.

Literally what you're saying makes no sense at all. 

i want to die

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Lumi said:

Literally what you're saying makes no sense at all. 

Ok. If I upload a picture to Squarespace. That picture has some sort of url on Squarespace's server. lets call it picture.com. To display the picture stored at picture.com, I'd link <img src="picture.com">. Yes? yes.

 

But locally that same picture stored on my local computer its at "./picture.jpg", and therefore I'd link <img src="./picture.jpg">.

 

Both works. But if my html code calls for "./picture.jpg" on squarespace its not going to display, cause thats not a filepath that exists for squarespace end users. 

 

I was looking for a website host like Google SItes or Squarespace where I could just be givena root folder on their segment so that I wouldn't have to use urls. Which is where go daddy hosting comes in.

 

Its not difficult to understand.

Link to comment
Share on other sites

Link to post
Share on other sites

21 minutes ago, BrownZeus said:

Ok. If I upload a picture to Squarespace. That picture has some sort of url on Squarespace's server. lets call it picture.com. To display the picture stored at picture.com, I'd link <img src="picture.com">. Yes? yes.

 

But locally that same picture stored on my local computer its at "./picture.jpg", and therefore I'd link <img src="./picture.jpg">.

 

Both works. But if my html code calls for "./picture.jpg" on squarespace its not going to display, cause thats not a filepath that exists for squarespace end users. 

 

I was looking for a website host like Google SItes or Squarespace where I could just be givena root folder on their segment so that I wouldn't have to use urls. Which is where go daddy hosting comes in.

 

Its not difficult to understand.

yes it will lmfao

if you put img src="./imgs/mypicture.jpg"

then the browser will automatically try to fetch mysite.com/imgs/mypicture.jpg

 

and if ur not gonna upload ur entire site convert your images to data urls

i want to die

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/26/2017 at 8:06 PM, Lumi said:

yes it will lmfao

if you put img src="./imgs/mypicture.jpg"

then the browser will automatically try to fetch mysite.com/imgs/mypicture.jpg

 

and if ur not gonna upload ur entire site convert your images to data urls

Homie, I already tried it. That's not how it works dude.

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/27/2017 at 11:17 PM, BrownZeus said:

Homie, I already tried it. That's not how it works dude.

Then you clearly have no idea what you're doing.

i want to die

Link to comment
Share on other sites

Link to post
Share on other sites

On ‎28‎/‎09‎/‎2017 at 4:17 AM, BrownZeus said:

Homie, I already tried it. That's not how it works dude.

That is exactly how it works. root  is where ever the current page is so having:

 

/index.html

/images

/somedir/index.php

 

in index.html /pictures would be the pictures folder but for /somedir/index.php /images would be /somedir/images

 

so long as you link up correctly /images for index.html and ../images for index.php then it wouldn't matter where you store the files they will link up assuming you keep the file tree the same. 

 

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

Link to comment
Share on other sites

Link to post
Share on other sites

On 26/09/2017 at 5:06 PM, Lumi said:

yes it will lmfao

if you put img src="./imgs/mypicture.jpg"

then the browser will automatically try to fetch mysite.com/imgs/mypicture.jpg

 

and if ur not gonna upload ur entire site convert your images to data urls

 

On 27/09/2017 at 8:17 PM, BrownZeus said:

Homie, I already tried it. That's not how it works dude.

Web Developer by trade here; that's EXACTLY how it works, assuming your server isn't a potato (incorrectly configured) and there aren't typos or syntax errors in your static HTML5 files. I actually work with WordPress primarily because of <reasons> but started out with XHTML back in the early 2000's so you're definitely on the right track with regards to looking for a hosting service that just allows you to upload a folder of your static content and display it via accessing a domainname.com/usernamehere/index.html file. (Although again, if the server is cPanel based running on CloudLinux, it should be configured to load your index.html/php files natively just by visiting that folder.)

 

The key thing to note is whether or not there's a DOT or a slash in front of your image src path. There's a great discussion over on StackOverflow covering this topic in case anyone is interested in exactly how it works. https://stackoverflow.com/questions/24028561/relative-path-in-html

Desktop: KiRaShi-Intel-2022 (i5-12600K, RTX2060) Mobile: OnePlus 5T | Koodo - 75GB Data + Data Rollover for $45/month
Laptop: Dell XPS 15 9560 (the real 15" MacBook Pro that Apple didn't make) Tablet: iPad Mini 5 | Lenovo IdeaPad Duet 10.1
Camera: Canon M6 Mark II | Canon Rebel T1i (500D) | Canon SX280 | Panasonic TS20D Music: Spotify Premium (CIRCA '08)

Link to comment
Share on other sites

Link to post
Share on other sites

10 minutes ago, kirashi said:

 

Web Developer by trade here; that's EXACTLY how it works, assuming your server isn't a potato (incorrectly configured) and there aren't typos or syntax errors in your static HTML5 files. I actually work with WordPress primarily because of <reasons> but started out with XHTML back in the early 2000's so you're definitely on the right track with regards to looking for a hosting service that just allows you to upload a folder of your static content and display it via accessing a domainname.com/usernamehere/index.html file. (Although again, if the server is cPanel based running on CloudLinux, it should be configured to load your index.html/php files natively just by visiting that folder.)

 

The key thing to note is whether or not there's a DOT or a slash in front of your image src path. There's a great discussion over on StackOverflow covering this topic in case anyone is interested in exactly how it works. https://stackoverflow.com/questions/24028561/relative-path-in-html

y o u d o n t n e e d a s e r v e r t o m a k e h t m l p a g e s a n d p r o p e r l y l i n k s h i t

i want to die

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Lumi said:

y o u d o n t n e e d a s e r v e r t o m a k e h t m l p a g e s a n d p r o p e r l y l i n k s h i t

Absolutely correct as well. Static HTML will load just fine from your computer. Was only providing information for OP to setup hosting for his particular school project.

Desktop: KiRaShi-Intel-2022 (i5-12600K, RTX2060) Mobile: OnePlus 5T | Koodo - 75GB Data + Data Rollover for $45/month
Laptop: Dell XPS 15 9560 (the real 15" MacBook Pro that Apple didn't make) Tablet: iPad Mini 5 | Lenovo IdeaPad Duet 10.1
Camera: Canon M6 Mark II | Canon Rebel T1i (500D) | Canon SX280 | Panasonic TS20D Music: Spotify Premium (CIRCA '08)

Link to comment
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

×