[SOLVED] Problem on shared hosting

#1

Hello to everyone, I’ve a question for you: today I wanted to run a test by uploading my hugo website on a shared hosting. I moved the public folder into the server, but when I load the site I cannot see the website well rendered ( I can see only the text) as when I run the hugo server locally.
To be sure that is not a problem of the shared hosting I also tried to run the website locally by using xampp and loading the public hugo folder but I had the same results.
what am I doing wrong?
Thanks for the help

#2

Without detail it’s hard to say but, the root of public is also the root of the site?

#3

Yes. I’m not an expert but I test in the past cms like wordpress and joomla working locally with xampp.
I put the public folder in the xampp/htdocs folder, run the apache webserver and from a browser look for localhost/public. I can see only the post without any trace of the template layout or images.

#4

I would say the paths are wrong. Try putting the content of public, in your site folder.

So if you have public/index.html that file will be http://mysite.com/index.html.

#5

Did you specify a baseURL?

#6

If you’d like a more precise answer, we need some more info to be able to help you, so please have a look at Requesting Help and provide some more details like your site repo? Thanks.

#7

I specify the baseurl, I put all the content of the public folder in the htdocs folder of server ( or locally with xampp) and no way to see any graphic. The browser load the index.html because I can see the homepage but only with the text. For this reason I tought it was not a problem of path.
I’m sorry but I’m building the site locally, no repo.

#8

Ok, I solved. In the shared hosting you have to put your file directly in the htdocs of the server without any folder. Thanks for the help

#9

You can put a folder (public, or whatever you want) but, you need to set baseurl to include it. You can either set baseurl in the config file, or, at the command line when you build. That way, you could publish to multiple locations for example.

1 Like
#10

I am facing the same issue. I have create a discussion here.

I have mentioned my base url as

baseURL = “http://localhost:80/public/