[copr] master: add notes about lighttpd config files and how to deploy them (8122506)
msuchy at fedoraproject.org
msuchy at fedoraproject.org
Thu Sep 5 08:20:48 UTC 2013
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 8122506c369a175769312a88a4d8d9627721f83f
Author: Miroslav Suchý <msuchy at redhat.com>
Date: Tue Sep 3 13:47:29 2013 +0200
add notes about lighttpd config files and how to deploy them
>---------------------------------------------------------------
backend-dist/lighttpd/dirlisting.conf | 8 +++
backend-dist/lighttpd/mime.conf | 76 +++++++++++++++++++++++++++++++++
copr-setup.txt | 9 ++++
copr.spec | 4 ++
4 files changed, 97 insertions(+), 0 deletions(-)
diff --git a/backend-dist/lighttpd/dirlisting.conf b/backend-dist/lighttpd/dirlisting.conf
new file mode 100644
index 0000000..787bcfc
--- /dev/null
+++ b/backend-dist/lighttpd/dirlisting.conf
@@ -0,0 +1,8 @@
+dir-listing.activate = "enable"
+dir-listing.hide-dotfiles = "disable"
+dir-listing.exclude = ( "~$" )
+dir-listing.encoding = "UTF-8"
+dir-listing.hide-header-file = "disable"
+dir-listing.show-header = "disable"
+dir-listing.hide-readme-file = "disable"
+dir-listing.show-readme = "disable"
diff --git a/backend-dist/lighttpd/mime.conf b/backend-dist/lighttpd/mime.conf
new file mode 100644
index 0000000..3a69b71
--- /dev/null
+++ b/backend-dist/lighttpd/mime.conf
@@ -0,0 +1,76 @@
+#######################################################################
+##
+## MimeType handling
+## -------------------
+##
+## http://www.lighttpd.net/documentation/configuration.html#mimetypes
+##
+## Use the "Content-Type" extended attribute to obtain mime type if
+## possible
+##
+mimetype.use-xattr = "disable"
+
+##
+## mimetype mapping
+##
+mimetype.assign = (
+ ".pdf" => "application/pdf",
+ ".sig" => "application/pgp-signature",
+ ".spl" => "application/futuresplash",
+ ".class" => "application/octet-stream",
+ ".ps" => "application/postscript",
+ ".torrent" => "application/x-bittorrent",
+ ".dvi" => "application/x-dvi",
+ ".gz" => "application/x-gzip",
+ ".pac" => "application/x-ns-proxy-autoconfig",
+ ".swf" => "application/x-shockwave-flash",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".tar" => "application/x-tar",
+ ".zip" => "application/zip",
+ ".mp3" => "audio/mpeg",
+ ".m3u" => "audio/x-mpegurl",
+ ".wma" => "audio/x-ms-wma",
+ ".wax" => "audio/x-ms-wax",
+ ".ogg" => "application/ogg",
+ ".wav" => "audio/x-wav",
+ ".gif" => "image/gif",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".png" => "image/png",
+ ".xbm" => "image/x-xbitmap",
+ ".xpm" => "image/x-xpixmap",
+ ".xwd" => "image/x-xwindowdump",
+ ".css" => "text/css",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".js" => "text/javascript",
+ ".asc" => "text/plain",
+ ".c" => "text/plain",
+ ".cpp" => "text/plain",
+ ".log" => "text/plain",
+ ".conf" => "text/plain",
+ ".text" => "text/plain",
+ ".txt" => "text/plain",
+ ".spec" => "text/plain",
+ ".dtd" => "text/xml",
+ ".xml" => "text/xml",
+ ".mpeg" => "video/mpeg",
+ ".mpg" => "video/mpeg",
+ ".mov" => "video/quicktime",
+ ".qt" => "video/quicktime",
+ ".avi" => "video/x-msvideo",
+ ".asf" => "video/x-ms-asf",
+ ".asx" => "video/x-ms-asf",
+ ".wmv" => "video/x-ms-wmv",
+ ".bz2" => "application/x-bzip",
+ ".tbz" => "application/x-bzip-compressed-tar",
+ ".tar.bz2" => "application/x-bzip-compressed-tar",
+ ".rpm" => "application/x-rpm",
+ # make the default mime type application/octet-stream.
+ "" => "text/plain",
+ )
+
+
+#
+#######################################################################
diff --git a/copr-setup.txt b/copr-setup.txt
index 266799d..ff839cb 100644
--- a/copr-setup.txt
+++ b/copr-setup.txt
@@ -49,6 +49,15 @@ Required pkgs:
http://infrastructure.fedoraproject.org/infra/ansible/files/copr/provision/terminatepb.yml
+Backend manualy:
+ - ntp should be enabled and started
+ - ports 22, 80, 443 should be open
+ - yum install copr-backend
+ - cp /usr/share/doc/copr-backend*/lighttpd/* /etc/lighttpd/conf.d/
+ - edit file /etc/lighttpd/lighttpd.conf as follows:
+ -server.document-root = server_root + "/lighttpd"
+ +server.document-root = "/srv/copr-repo"
+ this is recomended to be separate mount point
Frontend:
- rhel6ish - add epel
diff --git a/copr.spec b/copr.spec
index 35fb7bf..315c8e0 100644
--- a/copr.spec
+++ b/copr.spec
@@ -96,6 +96,9 @@ install -d %{buildroot}%{_sharedstatedir}/copr
install -d %{buildroot}%{_sharedstatedir}/copr/results
install -d %{buildroot}%{_var}/log/copr
install -d %{buildroot}%{_var}/log/copr/workers/
+install -d %{buildroot}%{_pkgdocdir}/lighttpd/
+
+cp -a backend-dist/lighttpd/* %{buildroot}%{_pkgdocdir}/lighttpd/
# for ghost files
touch %{buildroot}%{_var}/log/copr/copr.log
for i in `seq 7`; do
@@ -147,6 +150,7 @@ service httpd condrestart
%dir %attr(0755, copr, copr) %{_var}/log/copr/workers
%ghost %{_var}/log/copr/copr.log
%ghost %{_var}/log/copr/workers/worker-*.log
+%doc %{_pkgdocdir}/lighttpd
%files frontend
%doc LICENSE coprs.conf.example copr-setup.txt
More information about the copr-devel
mailing list