Coder Social home page Coder Social logo

directory-theme's Introduction

Directory Theme

A simple, customizable theme for your Apache or nginx directory listing. Here is a demo of what the result looks like: gif library.

Features

  • search the directory and display results, as the user inputs the search term
  • custom styling of the default directory indexing
  • .html files are linked to without the file extension (ex. http://localhost/example.html -> http://localhost/example)
  • changes "Last modified" column to display time as time since (ex. 2 minutes ago, 4 days ago, etc)

Apache Features

Apache Setup

Be sure you have mod_autoindex loaded on your server.

$ cd into_vhost_root_directory_you_want_to_be_prettified/
$ git clone [email protected]:jessfraz/directory-theme.git

# move the directory contents to the parent directory
$ cd directory-theme/
$ mv * .[^.]* ..
# you may get an output of: mv: cannot stat ‘*’: No such file or directory
# that's fine, if you `ls -a` the directory it should be empty
$ cd ../

# remove nginx items & .git just so it doesn't mess with your other stuff
$ rm -rf directory-theme.conf
$ rm -rf .git*

Then, view your virtual host in your favorite browser, cough Chrome cough.

nginx Setup

Be sure you have ngx_http_addition_module loaded on your server.

$ cd into_vhost_root_directory_you_want_to_be_prettified/
$ git clone [email protected]:jessfraz/directory-theme.git

# move the directory contents to the parent directory
$ cd directory-theme/
$ mv * .[^.]* ..
# you may get an output of: mv: cannot stat ‘*’: No such file or directory
# that's fine, if you `ls -a` the directory it should be empty
$ cd ../

# remove apache items & .git just so it doesn't mess with your other stuff
$ rm -rf .htaccess
$ rm -rf .git*

# rename directory-theme.conf to your site config name ex. lab.jessfraz.com
# at the same time moving it to the sites-available folder
$ sudo mv directory-theme.conf /etc/nginx/sites-available/lab.jessfraz.com

# edit the relevant fields for your setup
# these are server_name and root
$ sudo vim /etc/nginx/sites-available/lab.jessfraz.com

# activate the host by creating a symbolic link between
# the sites-available directory and the sites-enabled directory
$ sudo ln -s /etc/nginx/sites-available/lab.jessfraz.com /etc/nginx/sites-enabled/lab.jessfraz.com

# restart nginx
$ sudo service nginx restart

Then, view your virtual host in your favorite browser, cough Chrome cough.

Credits

Based off apaxy by Adam Whitcroft

Analytics

directory-theme's People

Contributors

jessfraz avatar wcypierre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

directory-theme's Issues

Unable to install

Hey! :)

I tried to install your directory theme on my nginx server but i had a problem this line:

include /etc/nginx/extras/basic.conf;

In my distribution (Debian) this config file doesn't exist (even in the nginx-extra package) and I don't know how to get it. I googled for it but... no luck :( The result is a page without any icon and with all the theme files listed.

Any advice?

500 Internal Server Error

Hi Jess!

How's it going?

This theme is legit! Can't go back to the default and ugly apache theme.

But here's a minor catch I found. So I recently upgraded to Yosemite and then my localhost stopped working. I get a 500 Internal Service Error when I load my local server. I couldn't figure out what was causeing this error. First, it thought it might be something in my httpd.config or username.conf, but nope, that wasn't it. Then I check the .htaccess tried commenting from line 68-71, and it worked! The 500 Error went away. so it's all good now.

    # RewriteEngine on
    # RewriteCond %{REQUEST_FILENAME} !-d
    # RewriteCond %{REQUEST_FILENAME}\.html -f
    # RewriteRule ^(.*)$ $1.html

So yeah, I don't think it's a major issue but I thought I'd share it anway.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.