From 9e17ed21722d72cf1279d602ba1fb8094f7ec707 Mon Sep 17 00:00:00 2001 From: bktan8 Date: Fri, 20 Mar 2020 08:46:19 -0700 Subject: [PATCH] Update nginx setting for iPXE doc (#1086) Closes #1085 Signed-off-by: Bun K Tan --- source/get-started/ipxe-install.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/get-started/ipxe-install.rst b/source/get-started/ipxe-install.rst index ae817de6..4b1b37c5 100644 --- a/source/get-started/ipxe-install.rst +++ b/source/get-started/ipxe-install.rst @@ -100,17 +100,27 @@ Setup nginx web server to host iPXE .. code-block:: bash + # setup nginx sudo mkdir -p /etc/nginx/conf.d sudo cp /usr/share/nginx/conf/nginx.conf.example /etc/nginx/nginx.conf + + # grant $USER permission to run the web server + sudo tee -a /etc/nginx/nginx.conf << EOF + user $USER; + EOF + + # web server config sudo tee -a /etc/nginx/conf.d/${IPXE_APP_NAME}.conf << EOF server { listen ${IPXE_PORT}; server_name localhost; + # directory to store ipxe location /${IPXE_APP_NAME}/ { root ${WEB_ROOT_DIR}/${IPXE_APP_NAME}; rewrite ^/${IPXE_APP_NAME}(/.*)$ \$1 break; } + # directory to store clr-installer configs location /${CLR_INSTALLER_CONF_DIR}/ { root ${WEB_ROOT_DIR}/${CLR_INSTALLER_CONF_DIR}; @@ -123,8 +133,7 @@ Setup nginx web server to host iPXE .. code-block:: bash - sudo systemctl enable nginx - sudo systemctl start nginx + sudo systemctl enable nginx --now Configure iPXE **************