Skip to content

Instantly share code, notes, and snippets.

@OroArmor
Last active November 3, 2021 22:01
Show Gist options
  • Save OroArmor/cffc0358b1d3f721791ef24707929176 to your computer and use it in GitHub Desktop.
Save OroArmor/cffc0358b1d3f721791ef24707929176 to your computer and use it in GitHub Desktop.
A template for a maven webserver with nginx
user root;
worker_processes 1;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
server_name maven.example.com;
location / {
root /home/maven;
client_max_body_size 0;
client_body_temp_path /tmp/client_temp;
dav_methods PUT DELETE MKCOL COPY MOVE;
create_full_put_path on;
dav_access user:rw group:rw all:r;
autoindex on;
limit_except GET PROPFIND OPTIONS HEAD {
auth_basic "Example.com's publishers only";
auth_basic_user_file .htpasswd;
}
}
listen 80;
}
}
@OroArmor
Copy link
Author

OroArmor commented Nov 3, 2021

maven.example.com -> replace with your maven server's URL
"Example.com's publishers only" -> replace with your failed authentication message
/home/maven -> replace with the location of storage for your server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment