Comments (5)
Nginx should be running by default, so you shouldn't need to configure anything. What's the status of nginx when vagrant is up and running?
sudo service nginx status
from devbox.
Here is the ouput when "vagrant up":
==> devbox: Running provisioner: file...
==> devbox: Running provisioner: shell...
devbox: Running: script: Switching PHP FPM to version 7.1
==> devbox: Running provisioner: shell...
devbox: Running: script: Switching PHP CLI to version 7.1
==> devbox: Running provisioner: shell...
devbox: Running: script: Creating Site for: site1.dev
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
Now the output of the command you suggested:
sudo service nginx status
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2017-11-23 09:45:23 UTC; 10min ago
Docs: man:nginx(8)
Process: 2013 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, st
Process: 1421 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 2018 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Main PID: 1425 (code=exited, status=0/SUCCESS)
Nov 23 09:45:23 damianlewis systemd[1]: Starting A high performance web server and a reverse proxy server...
Nov 23 09:45:23 damianlewis nginx[2018]: nginx: [emerg] a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-en
Nov 23 09:45:23 damianlewis nginx[2018]: nginx: configuration file /etc/nginx/nginx.conf test failed
Nov 23 09:45:23 damianlewis systemd[1]: nginx.service: Control process exited, code=exited status=1
Nov 23 09:45:23 damianlewis systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Nov 23 09:45:23 damianlewis systemd[1]: nginx.service: Unit entered failed state.
Nov 23 09:45:23 damianlewis systemd[1]: nginx.service: Failed with result 'exit-code'.
from devbox.
Are you using the latest version (v3.1.1)? There was an issue with nginx/apache switching in the previous version.
from devbox.
Sorry, I've just realised that you're trying to setup multiple sites. It's not something I've looked into yet.
In the case of nginx not working, it's probably because the serve-nginx.sh
script uses the default_server
parameter in the server configuration. If you've got multiple sites the script will be trying to declare each site as the default.
Trying removing the default_server
parameter from the script.
from devbox.
Yes, after I copied the output of the sudo service nginx status
, I could figure out what could be happening.
I removed the default_server
parameter and all is working again.
Now, I can develop two sites with the same vagrant box. Sometimes a project involves two or more sites.
Thank you very much!
from devbox.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devbox.