Update nginx setting for iPXE doc (#1086)

Closes #1085

Signed-off-by: Bun K Tan <bun.k.tan@intel.com>
This commit is contained in:
bktan8
2020-03-20 08:46:19 -07:00
committed by GitHub
parent 2417f133c6
commit 9e17ed2172
+11 -2
View File
@@ -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
**************