Nginx Clean URLs don’t work

I tried this: How do I enable clean URLs with Nginx?

And I tried this:

So, I tried these:

 location / {     index index.php;     # This is cool because no php is touched for static content     try_files $  uri $  uri/ @rewrite;     expires max;   }    location @rewrite {     # Some modules enforce no slash (/) at the end of the URL     # Else this rewrite block wouldn't be needed (GlobalRedirect)     rewrite ^/(.*)$   /index.php?q=$  1;   }    location ~ \.php$   {     include fastcgi_params;     fastcgi_param SCRIPT_FILENAME /srv/www/$  fastcgi_script_name;     fastcgi_intercept_errors on;     fastcgi_pass unix:/var/run/php-fpm.sock; # fastcgi_pass unix:/tmp/php5-fpm.sock;  } 

And I tried these:

server {      listen       80;      server_name;       location / {          root   /path/to/drupal;          index  index.php;          error_page 404 = @drupal;      }       location @drupal {          rewrite ^(.*)$   /index.php?q=$  1 last;      }  } 

And clean URL’s don’t work. The site runs at ip address in a subdir

It has its own config at /etc/nginx/sites-available/dev and symlinked to /etc/nginx/sites-enabled/dev

This is my current sites-available/default config:

 root /var/www;   # Add index.php to the list if you are using PHP  index index.html index.htm index.php;   server_name _;   location / {  # First attempt to serve request as file, then  # as directory, then fall back to displaying a 404.  # try_files $  uri $  uri/ =404;  try_files $  uri $  uri/ @rewrite;  expires max;  }   location @rewrite {    # Some modules enforce no slash (/) at the end of the URL    # Else this rewrite block wouldn't be needed (GlobalRedirect)    rewrite ^/(.*)$   /index.php?q=$  1;  }   # pass the PHP scripts to FastCGI server listening on  #  location ~ \.php$   {  include snippets/fastcgi-php.conf;   # With php7.0-cgi alone:  # fastcgi_pass;  # With php7.0-fpm:   fastcgi_pass unix:/run/php/php7.0-fpm.sock;   }   # deny access to .htaccess files, if Apache's document root  # concurs with nginx's one  #  location ~ /\.ht {   deny all;  } } 

This is my current sites-available/dev config:

server {          server_name dev;         root /var/www/dev; ## <-- Your only path reference.          # Enable compression, this will help if you have for instance advagg module         # by serving Gzip versions of the files.         gzip_static on;          location = /favicon.ico {                 log_not_found off;                 access_log off;         }          location = /robots.txt {                 allow all;                 log_not_found off;                 access_log off;         }          # This matters if you use drush prior to 5.x         # After 5.x backups are stored outside the Drupal install.         #location = /backup {         #        deny all;         #}          # Very rarely should these ever be accessed outside of your lan         location ~* \.(txt|log)$   {                 allow;                 deny all;         }          location ~ \..*/.*\.php$   {                 return 403;         }          # No no for private         location ~ ^/sites/.*/private/ {                 return 403;         }          # Block access to "hidden" files and directories whose names begin with a         # period. This includes directories used by version control systems such         # as Subversion or Git to store control files.         location ~ (^|/)\. {                 return 403;         }    location / {     index index.php;     # This is cool because no php is touched for static content     try_files $  uri $  uri/ @rewrite;     expires max;   }    location @rewrite {     # Some modules enforce no slash (/) at the end of the URL     # Else this rewrite block wouldn&#39;t be needed (GlobalRedirect)     rewrite ^/(.*)$   /index.php?q=$  1;   }    location ~ \.php$   {     include fastcgi_params;     fastcgi_split_path_info ^(.+\.php)(/.+)$  ;     fastcgi_param SCRIPT_FILENAME $  request_filename;     fastcgi_intercept_errors on;     fastcgi_pass unix:/run/php/php7.0-fpm.sock;  }          # Fighting with Styles? This little gem is amazing.         # This is for D6         #location ~ ^/sites/.*/files/imagecache/ {         # This is for D7 and D8         location ~ ^/sites/.*/files/styles/ {                 try_files $  uri @rewrite;         }          location ~* \.(js|css|png|jpg|jpeg|gif|ico)$   {                 expires max;                 log_not_found off;         }  } 

I restart nginx server by running sudo service nginx restart

Clean flashed Android crashes SIGSEGV, libc, art

I am a sad owner of Vernee Mix 2. It runs Android 7.0 with Helio P25 CPU. Generally, the phone is not that bad but the software is. It keeps freezing and restarting. I have not made any changes in rom structure. I flashed it 10 minutes ago for xxxx time and still nothing helps. Maybe you will be able to help me with this rubbish.

Full logcat

Updated laptop from 16.10 to 18.04 LTS, Stuck at /dev/… clean, ***/*** files, ***/*** blocks

Haven’t touched this laptop in a while, so when I did, I updated it to the most recent LTS.

It is a dual-booting Windows 10/Ubuntu system.

I get stuck at /dev/nvme0n1p7: clean, 291381/1324512 files, 3883511/5297920 blocks. after selecting Ubuntu in GRUB.

I saw some other users fix by purging nvidia drivers, which my system does not have (no nvidia GPU, tried it anyway, just listed 0 installed, 0 removed etc.)

Saw some others suggest sudo apt update, to which I got these:

Failed to fetch Could not resolve '' and similar 5 other lines, with the last one being cannot resolve ''.

Does anyone know what I can do to get back into my system?

How to properly clean my ventilation area on my MacBook Pro

So I moved to a tropical country and have a real problem with mosquitos and alikeenter image description here. They house themselves (dying) in the ventilation area and i regularly clean it up with a cotton swab, but the space is so small that the wholes that connect to the insides stay dirty and i’m worried i’ll have problems, also i like to have my things neat.

What would be the best way to clean this part of my computer, without pushing the mosquitos and the squished entrails deeper into the vents?

Clean Architecture – Should you inject all entity dependencies?

According to “Clean Architecture”, should you inject all entity dependencies (should you inject core business logic)?

For example, if I have a vector entity, should that entity be injected into all other entities/use cases or should the entities/use cases depend on vector directly?

In one way, it makes sense to inject vector because in theory you could have different implementations that might be faster for example.

But on the other hand, if you did have a faster implementation, you would probably want to use it everywhere, rather than mixing implementations in the codebase. This means depending directly on vector would make sense.

To prevent this question from being subjective, is there an exact answer to this question according to “Clean Architecture”? Or is this question entirely opinion-based?

Live boot or installed Linux USB to clean windows

I am planning on making a Ubuntu USB to clean up Windows based computers. So my question is, should I just create a live boot USB to clean Windows based computers? Could I install Ubuntu on a USB to do this or would it not work, or put my USB at risk (I know generally virus/malware doesn’t effect Linux)?

And if I should just stick to a live boot USB, would having a persistent partition be a risk or no?

To go Clean Architecture or not [on hold]

Let me explain first the project I am working on, So basically we have mobile app, a mediator (c# .net core based Web Api’s) and another server lets call it X-Server (Java based). So the core based Web api project act as Mediator between our Mobile App and our X-Server, Mobile app call Api endpoint on our Mediator and Mediator calls request to X-Server, and return response to Mobile apps. So Mediator Server is basically very simple system, no db related stuff or any other fancy stuff involved at Mediator. It just contains some controller with Action methods and that’s it.

Now I was having discussion with colleague and he is interested in moving our Mediator Server to Clean Architecture. Now I admit, i don’t have that much information or experience about using Clean Architecture but I am not sure whether Clean Architecture would be best fit for such a small Web api project. As far as I know and have studied Clean Architecture, it would be possible fit for large scale project i.e enterprise level application or more precisely DDD (Domain Driven Development)

I would really appreciate if someone share some thoughts on this.

How to upgrade to latest macOS with a clean install?

I have found several guides on how to put the installer on external media using this command:

sudo /Applications/Install\ macOS\ --volume /Volumes/Untitled/ --nointeraction 

However, when I run that command I get the error:

To use this tool, you must download the macOS installer application on a Mac with 10.12.5 or later, or El Capitan 10.11.6. For more information, please see the following:

I’m running 10.11.6, but when I follow that support article I get led in a circle – back to the App Store, which downloaded an 11 MB installer which led to the above error in the first place.

The only other thing I find is some third party web site that I am supposed to trust, to install their own tool to do the download. I am not going to install and trust such third party software. All I need to do is download the full version of the installer. Surely Apple must provide this somehow, since their own command is referring me to their own documentation (which strangely doesn’t tell me how to download the whole installer in a way that works!)

How do I get the full installer?

Note: This may seem like a duplicate of this question which is marked as a duplicate of this question. But all of the answers for those question either don’t work (lead me in a circle back to the App Store which downloads a tiny installer even after I delete it and try again) or refer me to a third piece of software that I’m not going to trust.

Is compressed air effective to clean a 2018 MacBook Pro keyboard which displays repeated keypresses?

My 2018 15″ retina MacBook Pro is starting to display the dreaded keyboard defects. Specifically, the “A” key started to register double keypresses. Initially this was very infrequent, but it appears to be getting worse. I would estimate that, in the last few minutes, about 5-10% of the time, a repeat keypress is happening.

Although I could take the computer to an authorized repair shop as it’s still under warranty (and I bought AppleCare for it), I know the turnaround time is fairly long, and this is the only computer I can realistically use without immensely disrupting my workflow. Also, there is no Apple Store within 500 km of my location. Therefore, I set out to look for DIY fixes.

I found this support document on Apple’s site recommending the use of compressed air as a possible fix to the issue. I have an oil-free air compressor that I could use to apply compressed air to the keyboard.

However, I’m somewhat afraid of doing this. Although this is an Apple recommended procedure, I can’t help but think this is aggressive procedure applied to a very delicate mechanism. In particular, I’m afraid my compressed air source may have a small rate of dust contamination which may actually worsen the problem. Has anyone actually used this procedure on a 2018 MacBook Pro keyboard, with the new silicone membrane, to see whether this recommendation is actually effective? I intend to postpone doing this until I see a success report.