Skip to content

Instantly share code, notes, and snippets.

@jiskanulo
Created February 13, 2018 05:44
Show Gist options
  • Save jiskanulo/2fc5f15153a351b6a0e70701de302477 to your computer and use it in GitHub Desktop.
Save jiskanulo/2fc5f15153a351b6a0e70701de302477 to your computer and use it in GitHub Desktop.
try Nginx on Vagrant
# -*- 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