This is a simple tool to generate Nginx Unit configuration for startup and build.
To run the index.html
file, you have multiple options:
-
Python (v3.x):
python3 -m http.server
Open your browser and navigate to
http://localhost:8000
. -
Node.js (http-server): Install
http-server
globally if not already installed:npm install -g http-server
Then, run:
http-server
Open your browser and navigate to the provided URL.
-
PHP Built-in Server:
php -S localhost:8000
Open your browser and navigate to
http://localhost:8000
.
- Simply double-click or open the
index.html
file in any modern web browser (e.g., Chrome, Firefox, Safari). Note that some advanced features might not work properly due to browser file restrictions.
- Create a
Dockerfile
:Build and run the Docker container:FROM nginx:alpine COPY index.html /usr/share/nginx/html/
Open your browser and navigate todocker build -t my-html-app . docker run -d -p 8080:80 my-html-app
http://localhost:8080
.
- Add the following to your Nginx configuration file:
Restart Nginx and open your browser to the configured URL.
server { listen 80; server_name localhost; location / { root /path/to/html/files; index index.html; } }
Choose the method that best suits your environment!
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT License - see the LICENSE file for details.