Created
February 13, 2018 05:44
-
-
Save jiskanulo/2fc5f15153a351b6a0e70701de302477 to your computer and use it in GitHub Desktop.
try Nginx on Vagrant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "centos/7" | |
config.vm.network "forwarded_port", guest: 80, host: 48080 | |
config.vm.provision "shell", inline: <<-SHELL | |
cat << EOF > /etc/yum.repos.d/nginx.repo | |
[nginx] | |
name=nginx repo | |
baseurl=http://nginx.org/packages/mainline/centos/7/x86_64/ | |
gpgcheck=0 | |
enabled=1 | |
EOF | |
yum update | |
yum install -y nginx | |
systemctl start nginx | |
cp /etc/nginx/nginx.conf /etc/nginx.conf.default | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment