This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Если вы хотите разрешить запрос смешанного контента, добавьте тег ниже: <head> тег. | |
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> | |
Если вы хотите, чтобы заблокировать затем добавить тег ниже в <head> тег: | |
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="csrf-token" content="{{ csrf_token() }}"> | |
//В main.js | |
$('.sendItAjax').on('click', function (e) { | |
e.preventDefault(); | |
var $this = $(this), | |
data = {}, | |
tmp = $this.data('data').split(','); | |
tmp.forEach(function (item) { | |
data[item] = $('#'+item).val() || $this.data(item) || null; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Global gitignore | |
cd ~ | |
touch .gitignore_global | |
git config --global core.excludesfile ~/.gitignore_global | |
gedit ~/.gitignore_global | |
.DS_Store | |
.idea | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install php7.2-xdebug | |
sudo find / -name 'xdebug.so' | |
sudo gedit /etc/php/7.2/fpm/php.ini | |
sudo gedit /etc/php/7.2/cli/php.ini | |
sudo gedit /etc/php/7.2/cli/conf.d/20-xdebug.ini | |
[Xdebug] | |
; путь к файлу so, который мы временно сохаринили на шаге раньше | |
zend_extension=/usr/lib/php/20170718/xdebug.so | |
; остальные обязательные параметры | |
xdebug.profiler_enable_trigger=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule ^(.*)$ public/$1 [L] | |
</IfModule> | |
======================================================== | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)/$ /$1 [L,R=301] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pre-Requisites | |
sudo apt-get update | |
sudo apt-get upgradesudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install apache2 libapache2-mod-php7.2 php7.2 php7.2-xml php7.2-gd php7.2-opcache php7.2-mbstring php-mysql | |
Installing Laravel | |
cd /tmp | |
curl -sS https://getcomposer.org/installer | php | |
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer | |
sudo mv composer.phar /usr/local/bin/composercd /var/www/html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen [::]:80; | |
root /home/www/laravel/public; | |
index index.php index.html index.htm index.nginx-debian.html; | |
location /v1/ { | |
proxy_pass http://192.168.200.251:80/; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $host; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes 1; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
multi_accept on; | |
use epoll; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install pptp-linux pptpd ppp curl | |
sudo nano /etc/ppp/peers/tgvpn | |
pty "pptp ***.***.***.*** --nolaunchpppd" | |
lock | |
noauth | |
nobsdcomp | |
nodeflate | |
name USERNAME | |
remotename tgvpn |
NewerOlder