Welcome! Log In Create A New Profile

Advanced

Re: sidebar menu + directory listing

Francis Daly
November 13, 2013 06:34PM
On Wed, Nov 13, 2013 at 11:52:05PM +0100, georg@riseup.net wrote:
> On 13-11-13 22:09:40, Francis Daly wrote:
> > On Wed, Nov 13, 2013 at 10:56:28PM +0100, georg@riseup.net wrote:

Hi there,

> Sorry, maybe I'm dumb, I'm not sure if I get it...

I'm trying to suggest that you do the background not-nginx-related
preparation work for your question outside of nginx, so that you have
a very clear idea of what you want nginx to do, and can then describe
clearly what that is.

> > Can you build a small directory tree, and manually create the files with
> > the content that you would like to have returned?
>
> For the directory tree, you mean something like:
>
> root
> |- index.html (should be displayed as html)
> |- n.html (should be displayed as html)
> |- dir1 (should be displayed via directory listing)
> |- dir2 (should be displayed via directory listing)

So, on the file system you have two files and two directories.

Presumably your web browser is going to make http requests for things
like "/" and "/index.html" and "/dir1/"; and you want nginx to return
specific content for each request.

> sidebar should look like:
>
> Index (should point to index.html)
> n (should point to n.html)
> dir1 (should point to dir1)
> dir2 (should point to dir2)

This part, I don't understand.

I suggest you do whatever it takes to manually create the html or
javascript or whatever you want, and put it in a file, so that when
your browser asks for that file, you see exactly what you want to see
on-screen.

Do this manually, for just this one example directory. Don't worry about
any part of it being dynamically generated. That comes later.

> > For directory listings, do a manual "ls" (or whatever) once to hard-code
> > the html.
>
> Doing "ls" where? Inside the html?

When you are manually creating the one-off static page that shows
exactly what you want, it will include mention of all nearby files
and directories.

Do whatever it takes -- possibly including "ls" -- to hard-code the
html-or-javascript that you want to see.

> Still unclear to me how I display html and directory listing at the same
> tome on the "same page".

Do a static one-off test first.

After that, you will have a much better idea of which parts you want to
be static and which parts you want to be dynamic.

And then your question might become "how do I change the 'autoindex'
output to be *this* instead of *that*?"; or it might become "how do I
get an 'index' file to generate output like *this*?"; or it might become
something else specific.

Right now, all I can understand of your question is "can nginx do what
I want?".

Maybe your question is already clear enough to other people, in which
case maybe they can offer suggestions.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

sidebar menu + directory listing

georg@riseup.net November 13, 2013 04:38PM

Re: sidebar menu + directory listing

Jonathan Matthews November 13, 2013 04:46PM

Re: sidebar menu + directory listing

georg@riseup.net November 13, 2013 04:58PM

Re: sidebar menu + directory listing

António P. P. Almeida November 13, 2013 05:10PM

Re: sidebar menu + directory listing

Francis Daly November 13, 2013 05:10PM

Re: sidebar menu + directory listing

georg@riseup.net November 13, 2013 05:54PM

Re: sidebar menu + directory listing

Francis Daly November 13, 2013 06:34PM

Re: sidebar menu + directory listing

georg@riseup.net November 13, 2013 06:40PM

Re: sidebar menu + directory listing

itpp2012 November 14, 2013 03:09AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 284
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready