Skip to content
Luis Felipe Sanchez edited this page Feb 26, 2025 · 1 revision

Welcome to the Nginxy wiki!

Docker Setup

This project includes a Docker configuration that allows you to quickly set up and test the Nginxy theme with Nginx and the fancyindex module.

Prerequisites

  • Docker installed on your system

Building and Running the Docker Container

  1. Clone the repository

    git clone https://github.com/lfelipe1501/Nginxy.git
    cd Nginxy
  2. Build the Docker image

    docker build -t nginxy-fancyindex .
  3. Run the container

    docker run -d -p 8080:80 --name nginxy-container nginxy-fancyindex

    This command will:

    • Run the container in detached mode (-d)
    • Map port 8080 on your host to port 80 in the container
    • Name the container "nginxy-container"
  4. Access the file browser

Open your web browser and navigate to: http://localhost:8080

You should see the Nginxy theme in action, displaying the contents of the /var/www/html directory.

To see the example files, navigate to: http://localhost:8080/files/

Managing the Container

  • Stop the container

    docker stop nginxy-container
  • Start the container again

    docker start nginxy-container
  • Remove the container

    docker rm nginxy-container

Customizing the Setup

  • Using your own files: You can mount a local directory to display your own files:

    docker run -d -p 8080:80 -v /path/to/your/files:/var/www/html/custom-files --name nginxy-container nginxy-fancyindex

    Then access them at http://localhost:8080/custom-files/

  • Custom configuration: You can modify the test/ngx-template.conf file before building the image to customize the Nginx configuration.

Troubleshooting

  • If you encounter permission issues, ensure the files in your mounted volumes have appropriate permissions.
  • To view logs from the container:
    docker logs nginxy-container
  • To access the container's shell:
    docker exec -it nginxy-container /bin/sh

Notes

  • The Docker image is based on Alpine Linux for minimal size
  • The theme is automatically downloaded from the official release
  • Both light and dark themes are supported and will automatically switch based on your system preferences