New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimise how we detect that nginx is installed #282

Closed
kirrg001 opened this Issue Jul 5, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@kirrg001
Copy link
Contributor

kirrg001 commented Jul 5, 2017

Right now we detect if nginx is installed like this:

dpkg -l | grep nginx

But if you remove nginx with sudo apt-get remove nginx, the CLI won't detect that nginx is not installed anymore and you will run into a connection refused error in the browser.

Even sudo service nginx restart doesn't show any error.

We should extend the nginx installation check by adding e.g. which nginx or nginx -t.
But we have to ensure that this extra check works on none ubuntu systems.

@acburdine acburdine modified the milestones: 1.0.1, 1.1.0 Jul 23, 2017

@acburdine acburdine marked this as a duplicate of #406 Jul 31, 2017

@acburdine acburdine referenced this issue Jul 31, 2017

Closed

Ghost-CLI not recognizing Nginx #406

0 of 1 task complete

@acburdine acburdine added this to Backlog in Ghost-CLI Aug 3, 2017

@SixBytesUnder

This comment has been minimized.

Copy link

SixBytesUnder commented Aug 19, 2017

Hi
I have CentOS 7 with nginx/1.10.2 installed but while installing Ghost I get:

? Do you wish to set up Nginx? Yes
Nginx is not installed. Skipping Nginx setup.
Setting up Nginx [skipped]
Task ssl depends on the 'nginx' stage, which was skipped.
Setting up SSL [skipped]

Since I'm on CentOS I obviously don't have dpkg. Will you add a different way of detecting if nginx exists on the server?

@acburdine

This comment has been minimized.

Copy link
Member

acburdine commented Aug 21, 2017

@SixBytesUnder does which nginx return anything?

As stated in the issue - there is a proposed switch from dpkg to which nginx - just need to make sure it works on non-Debian/ubuntu systems.

@SixBytesUnder

This comment has been minimized.

Copy link

SixBytesUnder commented Aug 21, 2017

which nginx on my CentOS 7.3.1611 (Core) returns
/usr/sbin/nginx
On my old server with CentOS 6.9 (Final) returns also
/usr/sbin/nginx

Hope that helps

Edit
on both systems nginx -t complains about lack of privileges, but

sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

@kirrg001 kirrg001 removed this from the 1.1.0 milestone Jan 12, 2018

@kirrg001

This comment has been minimized.

Copy link
Contributor Author

kirrg001 commented Jan 12, 2018

Closing in favour of #460.
We need to extend how we detect that nginx/mysql are installed.

@kirrg001 kirrg001 closed this Jan 12, 2018

Ghost-CLI automation moved this from Backlog to Done, pending release Jan 12, 2018

@kirrg001 kirrg001 removed this from Done, pending release in Ghost-CLI Jan 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment