nginx not restarting

I installed nginx on my Ubuntu 18.04. After that I made some changes in the default file. Now I am trying to start it but I am getting following error:

$   sudo service nginx restart 

Job for nginx.service failed because the control process exited with error code. See “systemctl status nginx.service” and “journalctl -xe” for details.

$   systemctl status nginx.service 

nginx.service – A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en Active: failed (Result: exit-code) since Sat 2019-05-25 13:35:03 CDT; 19min a Docs: man:nginx(8) Process: 3220 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code Process: 3219 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process

May 25 13:35:01 lc2530hz nginx[3220]: nginx: [emerg] bind() to failed May 25 13:35:01 lc2530hz nginx[3220]: nginx: [emerg] bind() to [::]:80 failed (9 May 25 13:35:02 lc2530hz nginx[3220]: nginx: [emerg] bind() to failed May 25 13:35:02 lc2530hz nginx[3220]: nginx: [emerg] bind() to [::]:80 failed (9 May 25 13:35:02 lc2530hz nginx[3220]: nginx: [emerg] bind() to failed May 25 13:35:02 lc2530hz nginx[3220]: nginx: [emerg] bind() to [::]:80 failed (9 May 25 13:35:03 lc2530hz nginx[3220]: nginx: [emerg] still could not bind() May 25 13:35:03 lc2530hz systemd[1]: nginx.service: Control process exited, code May 25 13:35:03 lc2530hz systemd[1]: nginx.service: Failed with result ‘exit-cod May 25 13:35:03 lc2530hz systemd[1]: Failed to start A high performance web serv lines 1-17/17 (END)

$   journalctl -xe  Defined-By: systemd -- Support: -- -- Unit phpsessionclean.service has finished starting up. -- -- The start-up result is RESULT. May 25 13:42:32 lc2530hz systemd[1]: Starting Message of the Day... -- Subject: Unit motd-news.service has begun start-up -- Defined-By: systemd -- Support: -- -- Unit motd-news.service has begun starting up. May 25 13:42:32 lc2530hz systemd[1]: Started Message of the Day. -- Subject: Unit motd-news.service has finished start-up -- Defined-By: systemd -- Support: -- -- Unit motd-news.service has finished starting up. -- -- The start-up result is RESULT. May 25 13:42:53 lc2530hz org.gnome.Shell.desktop[1989]: (/usr/lib/firefox/firefo May 25 13:42:58 lc2530hz systemd-resolved[782]: Server returned error NXDOMAIN, May 25 13:47:19 lc2530hz /usr/lib/gdm3/gdm-x-session[1855]: (II) event5  - PixAr lines 1576-1598/1598 (END)  $    nginx -t 

nginx: [alert] could not open error log file: open() “/var/log/nginx/error.log” failed (13: Permission denied) 2019/05/25 14:01:03 [warn] 3564#3564: the “user” directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1 nginx: the configuration file /etc/nginx/nginx.conf syntax is ok 2019/05/25 14:01:03 [emerg] 3564#3564: open() “/run/” failed (13: Permission denied) nginx: configuration file /etc/nginx/nginx.conf test failed zulfi@lc2530hz:/etc/nginx/sites-enabled$

/etc/nginx/sites-enabled$   cat default 


You should look at the following URL’s in order to grasp a solid understanding

of Nginx configuration files in order to fully unleash the power of Nginx.


In most cases, administrators will remove this file from sites-enabled/ and

leave it as reference inside of sites-available where it will continue to be

updated by the nginx packaging team.


This file will automatically load configuration files provided by other

applications, such as Drupal or WordPress. These applications will be made

available underneath a path with that package name, such as /drupal8.


Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.


Default server configuration

server { listen 80 default_server; listen [::]:80 default_server;

# SSL configuration # # listen 443 ssl default_server; # listen [::]:443 ssl default_server; # # Note: You should disable gzip for SSL traffic. # See: # # Read up on ssl_ciphers to ensure a secure configuration. # See: # # Self signed certs generated by the ssl-cert package # Don’t use them in a production server! # # include snippets/snakeoil.conf;

root /var/www/html;

# Add index.php to the list if you are using PHP index index.php index.html index.htm index.nginx-debian.html;


location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $ uri $ uri/ =404; }

# pass PHP scripts to FastCGI server # location ~ .php$ { # include snippets/fastcgi-php.conf; # # # With php-fpm (or other unix sockets): fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; # # With php-cgi (or other tcp sockets): # fastcgi_pass; fastcgi_index index.php; include fastcgi_params; }

# deny access to .htaccess files, if Apache’s document root # concurs with nginx’s one # #location ~ /.ht { # deny all; #} }

Virtual Host configuration for


You can move that to a different file under sites-available/ and symlink that

to sites-enabled/ to enable it.


server {

listen 80;

listen [::]:80;




root /var/www/;

index index.html;


location / {

try_files $ uri $ uri/ =404;


} user@lc2530hz:/etc/nginx/sites-enabled$

Somebody please guide me how to restart the nginx.


DataBase Kernel Restarting

Estou aprendendo sobre DataBase, porém nãos sei como ao digitar alguns dados e dar o comando para aparecer me aparece a seguinte mensagem.

The kernel appears to have died. It will restart automatically.

Entendi, porem esse Kernel não reinicia, e eu preciso terminar isso logo, existe algo que eu possa fazer para que essa situação acabe?

No momento uso o Anaconda Navigator, Jupyter para aprender sobre DataBase.

iPhone keeps restarting: how to identify the (probable) offending app?

So my phone keeps rebooting after working seemingly normally for some time, albeit quite a short one – I’d say around 10 minutes, seems to be quite shorter if I’m using it, no matter the app.

It started doing it today, apparently out of nowhere; I tried scrolling the privacy -> analytics section of the settings app, but didn’t find anything obvious.. I noticed some (many) panic-full-<datetime>.ips files with what seems to be a memory and diagnostic dump from the incidents, but again they don’t seem to show anything obvious.

Is there any way of identifying the offending piece of software?

It’s an iPhone XS, and it has been on the latest OS (12.2 I think) since its release, so it’s been a while now.

Powershell script for Restarting SharePoint Timer Service (SPTimerV4)

On SharePoint log folder so many “.usage” files are creating and not getting deleting. Due to space issue occurring. So We are restarting “SPTimerV4” service manually. We need to scheduled task scheduler job for restarting every half an hour. Could any please share powershell script how to restart “SPTimerV4” service using powershell . Highly appreciate your help.

Note: We are using single farm of SP 2010 and Task scheduler job creating we can do it.

Macbook Upgrade iOS restarting stuck

Just recently I upgraded my macbook to SSD and reinstall iOS X system, but previously the macbook Pro 2013 was running iOS Mojave. It has completed, and I tried to upgrade the Mac iOS to High Sierra immediately to allow timemachine(mojave) to be done. However, it is stuck at “Restarting…” with App Store Logo for 4 days now.

Does anyone know what is wrong? Thanks! enter image description here

Set ip address routing to default without restarting PC?

I have been testing on routing command in the windows shell e.g. route add mask

After all these test, the routing table is pretty messed up, and i had to reboot windows to so the proper routing is initiated again.

Is there any command i can run/batch file i can run such that it restore the routing table without rebooting?

I have tried disabling the network adapter and that does not seem to do it either.

Google Docs Preventing Sub-Lists from restarting numbering each time

Google doc’s numbered list functionality restarts sub-list “numbering” or “sequential lettering” like this:

1) First thing    a)    b) 2) Second thing    a) <- Sub-list numbering / sequential letters restarts    b) 

I want it to not to restart, and to rather act like this:

1) First thing    a)    b) 2) Second thing    c) <- Sub-list does not restart    d) 

Is this possible?

In PostgreSQL on Linux, editing pg_hba.conf and postgresql.conf and restarting Postgres crashes my cluster on restart (makes it ‘down’)

I have my PostgresSQL database on my Ubuntu 18.10 laptop, and I want to access my laptop database on my Desktop with Windows 10 PostgreSQL because I am learning how to use Microsoft’s Power BI and Power BI is only available on Windows.

Thus, I edited my postgresql.conf file as follows:

listen_addresses = 'localhost,my_public_ip_address,my_local_ip_address' 

Thus, I edited my pg_hba.conf file as follows (adding these lines to very bottom of file):

host    all             all             my_local_ip_address           md5 host    all             all             my_public_ip_address          md5 

After this, I run:

sudo /etc/init.d/postgresql restart sudo pg_lsclusters 

The postgresql service restarts unbelievably fast hinting at a problem and lsclusters reports:

Ver Cluster Port Status Owner    Data directory              Log file 11  main    5432 down   postgres /var/lib/postgresql/11/main /var/log/postgresql/postgresql-11-main.log 

For some reason, editing pg_hba.conf and postgresql.conf crashes my cluster and any attempt to log in with “psql postgres” or “psql -h localhost -d my_database -U my_user_name” results in:

me@me-computer_name:~$   psql postgres psql: could not connect to server: No such file or directory     Is the server running locally and accepting     connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? 

As soon as I restore my original .conf backups with the reverted changes and restart postgresql 11 again, everything works perfectly fine. Why does editing the two .conf files crash my client, and how can I enable my client to allow connections from other computers near my house (and ONLY my house) through my public / local ip?

Mission Control freezes. Restarting Dock doesn’t help

I use standard settings to open Mission Control in MacOS Mojave 10.14.4 on MacBook Pro.

Normally swipe up with 3 fingers move all windows into Mission Control mode and I can switch to any available window.

After some time period of time (may be several days) Mission Control stops working.

Swipe up gesture freezes my Mac for about one minute (only mouse cursor can be moved, no other changes on screen). After one minute (without any error messages) I can use apps again, Dock works as well, Cmd-Tab works to switch between applications, but Mission Control doesn’t appear in any way. I cannot start it neither by using Shift-Up (standard shortcut), nor from Spotlight.

There are a lot of ‘solutions’ in internet, where everybody advise to restart the Dock. I have restarted Dock several times, both using Activity Monitor, or Terminal. Dock process Id gets updated (it seems to be restarting), however it doesn’t solve my problem.

Only workaround I found so far is to reboot my Mac.