Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to stop directory listing with this theme? #42

Open
aaronpaulyo opened this issue Jun 13, 2021 · 4 comments
Open

how to stop directory listing with this theme? #42

aaronpaulyo opened this issue Jun 13, 2021 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@aaronpaulyo
Copy link

aaronpaulyo commented Jun 13, 2021

how to hide assets directory in this theme on live server.
I've tried this URL "https://stackoverflow.com/questions/42749268/jekyll-disable-directory-listing" to stop directory-listing it's working on localhost properly but when I tried for my server it's redirecting me to server address 0.0.0.0 on which my server is running any suggestions what should I do over here?

I want to do like this one "https://klise.vercel.app/assets" to get 404 page but it's not working for me can u guide me what i have to do for this outcome.

@piharpi piharpi added the help wanted Extra attention is needed label Jun 14, 2021
@piharpi
Copy link
Owner

piharpi commented Jun 14, 2021

what are You using Docker or something else?

@aaronpaulyo
Copy link
Author

aaronpaulyo commented Jun 14, 2021

what are You using Docker or something else?

I'm using the ubuntu 18.04 server of cloud at cost.

so basically i have my public ip 44.x.x.x and domain name from Godaddy and i've also setup the protection via cloud flair. so now the issue is whenever i start the jekyll with bundle exec jekyll serve i have 2 option either set the host to 44.x.x.x or 0.0.0.0 right?
but if i set it to 0.0.0.0 and try to redirect those /assets/ path it will go to the 0.0.0.0 instead of my original domain name(it's obvious thing that i know) and if i set the host name to 44.x.x.x(my public ip) then this time it will redirect to the domain but it'll disclose my public ip for 2-3 second that i don't want to be happened.

so i just wanted to know that how did you disable the directory listing and where did you setup that theme.

@0Ky
Copy link

0Ky commented Jul 2, 2021

how to hide assets directory in this theme on live server.

This is not an issue related to Jekyll or the theme. It's a behaviour of the web server (Apache/Nginx) that's hosting your website.

I want to do like this one "https://klise.vercel.app/assets" to get 404 page but it's not working for me can u guide me what i have to do for this outcome.

https://klise.vercel.app/ - This website is hosted on Vercel you may also use Netlify to host your static site for free and they disable directory listing by default.

If you want to deploy this template to either Netlify or Vercel, just hit the 'Deploy' button from the installation section.

@iHarshad
Copy link

iHarshad commented Jul 3, 2021

Jekyll outputs static HTML files which do not have any logic/mechanism to prevent directory listing. You can think of them as plaintext files that do nothing. You will have to disable directory listing on your server.

If you are using Apache server on your Ubuntu machine then you can disable directory listing in your .htaccess file or your Apache config files using Options -Indexes.

For Nginx server, you will have to use autoindex off; in your Nginx config files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants