• Как перевести в регулярное выражение (сжатие JS)?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Этот код удаляет пробелы только с одной стороны, к сожалению.
  • Как перевести в регулярное выражение (сжатие JS)?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Видимо, автор удалил свой комментарий...
  • Как перевести в регулярное выражение (сжатие JS)?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Bhudh, это, как я понимаю решение на JS?
    Мне надо на php...
  • Как заменить путь в url() (css)?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Сделал так:
    $css = str_replace('url(\'.', 'url(\'' . dirname($url_css[0]), $css);
  • Несколько "php-fpm: pool www" не должно быть?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Fixid, спасибо, Вам, Большое!
    Это решение!
  • Nginx жестко кэширует | Как отключить кэшировать HTML?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Rikcon, да! Мозги у меня включились только после того, как вопрос задал... До этого они не хотели включаться, блин.

    Спасибо!
  • Как снизить нагрузку на оперативную память в Linux (VPS)?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Dymok, как мне пометить Ваш ответ решением? Вы дали ответ, не давая ответа! :)
  • Как снизить нагрузку на оперативную память в Linux (VPS)?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Не влазит в один пост (> 10000):
    root        10  0.0  0.0      0     0 ?        S    May16   0:00 [watchdog/0]                                      
    root        11  0.0  0.0      0     0 ?        S    May16   0:00 [watchdog/1]                                      
    root        12  0.0  0.0      0     0 ?        S    May16   0:00 [migration/1]                                     
    root        13  0.0  0.0      0     0 ?        S    May16   0:03 [ksoftirqd/1]                                     
    root        15  0.0  0.0      0     0 ?        S<   May16   0:00 [kworker/1:0H]                                    
    root        16  0.0  0.0      0     0 ?        S    May16   0:00 [kdevtmpfs]                                       
    root        17  0.0  0.0      0     0 ?        S<   May16   0:00 [netns]                                           
    root        18  0.0  0.0      0     0 ?        S<   May16   0:00 [perf]                                            
    root        19  0.0  0.0      0     0 ?        S    May16   0:00 [khungtaskd]                                      
    root        20  0.0  0.0      0     0 ?        S<   May16   0:00 [writeback]                                       
    root        21  0.0  0.0      0     0 ?        SN   May16   0:00 [ksmd]                                            
    root        22  0.0  0.0      0     0 ?        SN   May16   0:01 [khugepaged]                                      
    root        23  0.0  0.0      0     0 ?        S<   May16   0:00 [crypto]                                          
    root        24  0.0  0.0      0     0 ?        S<   May16   0:00 [kintegrityd]                                     
    root        25  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root        26  0.0  0.0      0     0 ?        S<   May16   0:00 [kblockd]                                         
    root        27  0.0  0.0      0     0 ?        S<   May16   0:00 [ata_sff]                                         
    root        28  0.0  0.0      0     0 ?        S<   May16   0:00 [md]                                              
    root        29  0.0  0.0      0     0 ?        S<   May16   0:00 [devfreq_wq]                                      
    root        33  0.0  0.0      0     0 ?        S    May16   0:03 [kswapd0]                                         
    root        34  0.0  0.0      0     0 ?        S<   May16   0:00 [vmstat]                                          
    root        35  0.0  0.0      0     0 ?        S    May16   0:00 [fsnotify_mark]                                   
    root        36  0.0  0.0      0     0 ?        S    May16   0:00 [ecryptfs-kthrea]                                 
    root        52  0.0  0.0      0     0 ?        S<   May16   0:00 [kthrotld]                                        
    root        53  0.0  0.0      0     0 ?        S<   May16   0:00 [acpi_thermal_pm]                                 
    root        54  0.0  0.0      0     0 ?        S    May16   0:00 [vballoon]                                        
    root        55  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root        56  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root        57  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root        58  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root        59  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root        60  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root        61  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root        62  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root        63  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root        64  0.0  0.0      0     0 ?        S    May16   0:00 [scsi_eh_0]                                       
    root        65  0.0  0.0      0     0 ?        S<   May16   0:00 [scsi_tmf_0]                                      
    root        66  0.0  0.0      0     0 ?        S    May16   0:00 [scsi_eh_1]                                       
    root        67  0.0  0.0      0     0 ?        S<   May16   0:00 [scsi_tmf_1]                                      
    root        73  0.0  0.0      0     0 ?        S<   May16   0:00 [ipv6_addrconf]                                   
    root        86  0.0  0.0      0     0 ?        S<   May16   0:00 [deferwq]                                         
    root        87  0.0  0.0      0     0 ?        S<   May16   0:00 [charger_manager]                                 
    root       126  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root       127  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root       128  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root       129  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root       130  0.0  0.0      0     0 ?        S<   May16   0:00 [kpsmoused]                                       
    root       131  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root       132  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root       133  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root       134  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root       144  0.0  0.0      0     0 ?        S<   May16   0:00 [ttm_swap]                                        
    root       210  0.0  0.0      0     0 ?        S<   May16   0:00 [raid5wq]                                         
    root       238  0.0  0.0      0     0 ?        S<   May16   0:00 [bioset]                                          
    root       260  0.0  0.0      0     0 ?        S<   May16   0:05 [kworker/0:1H]                                    
    root       262  0.0  0.0      0     0 ?        S    May16   0:15 [jbd2/vda1-8]                                     
    root       263  0.0  0.0      0     0 ?        S<   May16   0:00 [ext4-rsv-conver]                                 
    root       327  0.0  0.0      0     0 ?        S<   May16   0:00 [iscsi_eh]                                        
    root       332  0.0  0.0      0     0 ?        S<   May16   0:00 [ib_addr]                                         
    root       334  0.0  0.0      0     0 ?        S<   May16   0:00 [ib_mcast]                                        
    root       335  0.0  0.0      0     0 ?        S<   May16   0:00 [ib_nl_sa_wq]                                     
    root       339  0.0  0.0      0     0 ?        S<   May16   0:00 [ib_cm]                                           
    root       340  0.0  0.0      0     0 ?        S<   May16   0:00 [iw_cm_wq]                                        
    root       341  0.0  0.0      0     0 ?        S<   May16   0:00 [rdma_cm]                                         
    root       342  0.0  0.0      0     0 ?        S    May16   0:00 [kauditd]                                         
    root       641  0.0  0.0      0     0 ?        S<   May16   0:03 [kworker/1:1H]                                    
    root     17310  0.0  0.0      0     0 ?        S    04:46   0:00 [kworker/u4:1]                                    
    root     18069  0.0  0.0      0     0 ?        S    05:07   0:00 [kworker/1:0]                                     
    root     18231  0.0  0.0      0     0 ?        S    05:09   0:00 [kworker/0:1]                                     
    root     18663  0.0  0.0      0     0 ?        S    05:23   0:00 [kworker/u4:2]                                    
    root     18916  0.0  0.0      0     0 ?        S    05:31   0:00 [kworker/0:2]                                     
    root     19206  0.0  0.0      0     0 ?        S    05:38   0:00 [kworker/1:3]
  • Как снизить нагрузку на оперативную память в Linux (VPS)?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Вот что вернуло
    USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND                                           
    mysql     1093  0.5 35.3 1624764 359440 ?      Ssl  May16   6:17 /usr/sbin/mysqld                                  
    root      1580  0.1  4.8 1387032 49464 ?       Sl   May16   1:10 bin/core ispmgr                                   
    www-data  1953  0.0  2.4 516120 25392 ?        S    May16   0:01 php-fpm: pool www                                 
    root      1261  0.1  2.4 298364 24800 ?        Sl   May16   1:30 /usr/bin/python3 /usr/bin/fail2ban-server -s /var/
    www-data  1952  0.0  2.1 437176 21964 ?        S    May16   0:02 php-fpm: pool www                                 
    root      2179  0.0  1.8 653952 18512 ?        Sl   May16   0:44 bin/core core                                     
    bind      1060  0.0  1.4 284452 14504 ?        Ssl  May16   0:00 /usr/sbin/named -f -u bind                        
    root      1245  0.0  1.1 510176 12076 ?        Ss   May16   0:03 /usr/sbin/apache2 -k start                        
    www-data 11492  0.0  1.0 510208 10516 ?        S    May16   0:03 /usr/sbin/apache2 -k start                        
    www-data 21140  0.0  1.0 510208 10516 ?        S    May16   0:02 /usr/sbin/apache2 -k start                        
    www-data  1947  0.0  1.0 510208 10512 ?        S    May16   0:04 /usr/sbin/apache2 -k start                        
    www-data  1950  0.0  1.0 510208 10512 ?        S    May16   0:04 /usr/sbin/apache2 -k start                        
    www-data  3317  0.0  1.0 510208 10512 ?        S    May16   0:04 /usr/sbin/apache2 -k start                        
    www-data  1946  0.0  1.0 510208 10472 ?        S    May16   0:04 /usr/sbin/apache2 -k start                        
    www-data  1948  0.0  1.0 510208 10460 ?        S    May16   0:04 /usr/sbin/apache2 -k start                        
    root      1056  0.0  1.0 434316 10232 ?        Ss   May16   0:04 php-fpm: master process (/etc/php/7.2/fpm/php-fpm.
    root       585  0.0  0.9 290168  9392 ?        Ssl  May16   0:03 /usr/lib/snapd/snapd                              
    root      1236  1.4  0.8 177196  8248 ?        Ss   May16  16:32 /usr/local/mgr5/sbin/ihttpd                       
    root     19598  0.0  0.6  92680  6412 ?        Ss   05:46   0:00 sshd: root [priv]                                 
    www-data 14357  0.0  0.5  35344  6052 ?        S    May16   0:31 nginx: worker process                             
    www-data 14356  0.0  0.5  35004  5236 ?        S    May16   0:28 nginx: worker process                             
    root     19185  0.0  0.5  22704  5160 pts/0    S    05:38   0:00 -su                                               
    root         1  0.0  0.4 119620  4532 ?        Ss   May16   0:09 /sbin/init                                        
    root     19179  0.0  0.4  32928  4220 ?        S    05:38   0:00 shellinaboxd -d --port 52715 --disable-ssl --local
    root      1089  0.0  0.3   5720  3516 ?        S<Ls May16   0:12 /sbin/iscsid                                      
    root     19181  0.0  0.3  52480  3420 pts/0    Ss   05:38   0:00 shellinaboxd -d --port 52715 --disable-ssl --local
    root     19579  0.0  0.3  20932  3388 ?        S    05:45   0:00 dovecot/config                                    
    Debian-+  1561  0.0  0.3 127328  3352 ?        Ss   May16   0:00 /usr/sbin/exim4 -bd -q30m                         
    proftpd   1237  0.0  0.3 115540  3288 ?        Ss   May16   0:00 proftpd: (accepting connections)                  
    root     19616  0.0  0.3  37512  3288 pts/0    R+   05:47   0:00 ps aux --sort -rss                                
    root      1052  0.0  0.3  65512  3196 ?        Ss   May16   0:03 /usr/sbin/sshd -D                                 
    sshd     19599  0.0  0.3  65512  3188 ?        S    05:46   0:00 sshd: root [net]                                  
    root      1233  0.0  0.3  33160  3184 ?        Ss   May16   0:00 nginx: master process /usr/sbin/nginx -c /etc/ngin
    root     19184  0.0  0.3  49348  3076 pts/0    S    05:38   0:00 /bin/su - root                                    
    root       637  0.0  0.2 277088  2884 ?        Ssl  May16   0:00 /usr/lib/policykit-1/polkitd --no-debug           
    ntp       1599  0.0  0.2 110032  2856 ?        Ss   May16   0:06 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 111:117 
    root       329  0.0  0.2  28504  2844 ?        Ss   May16   0:09 /lib/systemd/systemd-journald                     
    root       379  0.0  0.2  44504  2616 ?        Ss   May16   0:00 /lib/systemd/systemd-udevd                        
    root       572  0.0  0.2  28624  2612 ?        Ss   May16   0:01 /lib/systemd/systemd-logind                       
    root     17361  0.0  0.2  36832  2420 ?        Ss   04:47   0:00 /lib/systemd/systemd --user                       
    root      1095  0.0  0.2  18160  2264 ?        Ss   May16   0:00 /usr/sbin/dovecot                                 
    root       564  0.0  0.2  29012  2232 ?        Ss   May16   0:01 /usr/sbin/cron -f                                 
    root     19180  0.0  0.1  32680  2000 ?        S    05:38   0:00 shellinaboxd -d --port 52715 --disable-ssl --local
    syslog     612  0.0  0.1 256392  1924 ?        Ssl  May16   0:02 /usr/sbin/rsyslogd -n                             
    message+   595  0.0  0.1  42904  1876 ?        Ss   May16   0:02 /usr/bin/dbus-daemon --system --address=systemd: -
    root     17363  0.0  0.1 143072  1868 ?        S    04:47   0:00 (sd-pam)                                          
    dovecot   1097  0.0  0.1   9524  1612 ?        S    May16   0:00 dovecot/anvil                                     
    root       577  0.0  0.1 275752  1608 ?        Ssl  May16   0:04 /usr/lib/accountsservice/accounts-daemon          
    root       566  0.0  0.1 308640  1536 ?        Ssl  May16   0:00 /usr/bin/lxcfs /var/lib/lxcfs/                    
    root      1214  0.0  0.1  15936  1440 tty1     Ss+  May16   0:00 /sbin/agetty --noclear tty1 linux                 
    root       568  0.0  0.1   4396  1296 ?        Ss   May16   0:00 /usr/sbin/acpid                                   
    root     19183  0.0  0.0   9564   944 pts/0    S    05:38   0:00 /bin/bash /usr/local/mgr5/shell/ispmgr.6473b6101fc
    root      1098  0.0  0.0   9656   864 ?        S    May16   0:00 dovecot/log                                       
    root     15948  0.0  0.0   9520   364 ?        S    02:33   0:00 dovecot/ssl-params                                
    root       366  0.0  0.0 102972   312 ?        Ss   May16   0:00 /sbin/lvmetad -f                                  
    root      1208  0.0  0.0  19476   232 ?        Ss   May16   0:02 /usr/sbin/irqbalance --pid=/var/run/irqbalance.pid
    root       640  0.0  0.0  13372   144 ?        Ss   May16   0:00 /sbin/mdadm --monitor --pid-file /run/mdadm/monito
    root      1088  0.0  0.0   5220   124 ?        Ss   May16   0:02 /sbin/iscsid                                      
    root         2  0.0  0.0      0     0 ?        S    May16   0:00 [kthreadd]                                        
    root         3  0.0  0.0      0     0 ?        S    May16   0:01 [ksoftirqd/0]                                     
    root         5  0.0  0.0      0     0 ?        S<   May16   0:00 [kworker/0:0H]                                    
    root         7  0.1  0.0      0     0 ?        S    May16   1:16 [rcu_sched]                                       
    root         8  0.0  0.0      0     0 ?        S    May16   0:00 [rcu_bh]                                          
    root         9  0.0  0.0      0     0 ?        S    May16   0:00 [migration/0]

    Продолжение ниже
    Вижу в списке "php-fpm" занимает 2.4 мегабайта (как я понимаю), но он у меня выключен...
  • Как снизить нагрузку на оперативную память в Linux (VPS)?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Это еще одна проблема. Я не могу понять от куда выросли ноги...
    Про Swap не думал. Буду пробовать его включать...
  • Как избавиться от: "an upstream response is buffered to a temporary file"?

    Slash-Zn
    @Slash-Zn Автор вопроса
    То есть появляются через какое то количество раз....
  • Как решить" connect() to unix:/var/run/php-fpm.www-data.sock" без php-fpm?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Да, в общем то ни чего не копировал, Просто Включил Nginx в ISP manager и обновил phpMyAdmin.

    // Очевидно, у вам не в том месте (не у того веб-сервера) добавлена обработка PHP-файлов.
    А где она пишется?
  • Как избавиться от: "an upstream response is buffered to a temporary file"?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Спасибо за ответ.
    Выходит, лучшим вариантом будет: просто не обращать внимание?
  • Панель phpMyAdmin: Угроза безопасности (https). Как исправить?

    Slash-Zn
    @Slash-Zn Автор вопроса
    На Apache (без Nginx) работало. Вот только я не помню, по какому протоколу (http | https)... Для домена SSL был установлен.
  • Как оформить код Nginx?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Не пойму, как этот сервис может помочь мне оформить правило для моего конфига?
  • Как сделать заголовок Last-Modified для двух групп пользователей?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Я, кстати, тоже об это думаю.
    Спасибо.
  • Почему не работает location (Переход с Apache в Nginx)?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Сделал так:
    server {
    		server_name site.net;
    		disable_symlinks if_not_owner;
    
    		set  $base /var/www/www-root/data/www/site.net;
    		root $base/public;
    
    		listen 80;
    		listen [::]:80;
    
    		include /etc/nginx/vhosts-includes/*.conf;
    
    		location @fallback {
    			error_log /dev/null crit;
    			proxy_pass http://127.0.0.1:8080;
    			proxy_redirect http://127.0.0.1:8080 /;
    			proxy_set_header Host $host;
    			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    			proxy_set_header X-Forwarded-Proto $scheme;
    			access_log off ;
    		}
    
    		location ~ \.php$ {
    			fastcgi_pass xx.xxx.xx.xxx:443;
    			proxy_pass http://127.0.0.1:8080;
    		}
    
    		location / {
    			try_files $uri /index.php?do=$uri;
    		}
    
    		location ~* \.(jpg|jpeg|gif|png|ico|js|css|html)$ {
    			expires 7d;
    		}
    	}

    Опять не то... PHP работает, как Apache.
  • Почему не работает location (Переход с Apache в Nginx)?

    Slash-Zn
    @Slash-Zn Автор вопроса
    Владимир Скибин, можно примерчик, как это сделать?
    Спасибо.