Posts

Showing posts with the label Ubuntu

Nginx Reverse configuration

Simple Nginx proxy reverse configuration add the file proxy.conf in /etc/nginx/conf.d/ proxy_http_version 1.1; proxy_set_header Host               $http_host; proxy_set_header X-Real-IP          $remote_addr; proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto  $scheme; proxy_set_header Upgrade            $http_upgrade; proxy_set_header Connection         "Upgrade";  Configuration for the domain simple server { listen 80; listen [::]:80; server_name example.com; location / {   include conf.d/proxy.conf; proxy_pass http://192.168.123.321:3000/; } }

Forcing the from address when postfix relays over smtp

Force to send all e-mail with the same email address. accepted This is how to really do it in postfix. This config changes sender addresses from both local originated, and relayed SMTP mail traffic: /etc/postfix/main.cf: sender_canonical_classes = envelope_sender, header_sender sender_canonical_maps = regexp:/etc/postfix/sender_canonical_maps smtp_header_checks = regexp:/etc/postfix/header_check Rewrite envelope address from email originating from the server itself /etc/postfix/sender_canonical_maps: /.+/ newsender@address.com Rewrite from address in SMTP relayed e-mail /etc/postfix/header_check: /From:.*/ REPLACE From: newsender@address.com

Instalando SARG ubuntu 14.04

Image
Instalando SARG ubuntu 14.04

Como limpar a partição de boot ubuntu

Image
Quando você tentar fazer a instalação de algum programa no ubuntu e ele diz que não é possível execute apt-get -f install para forçar ou continuar a instalar os pacotes etc, e fica em um loop eterno, o servidor deve estar com a partição de boot cheia, verifique o volume dando o comando df -h caso esteja em 100% execute o comando abaixo para limpar. uname -r verifique o KERNEL que o servidor tem instalado sudo dpkg --list 'linux-image*' removendo as versões não desejáveis. sudo dpkg -r linux-image-3.2.0-23-generic or sudo dpkg --force-depends --purge linux-image-3.2.0-23-generic

Munin Ubuntu 12.04

Image
Munin Para instalar sudo apt-get install munin Configurar sudo vim /etc/munin/munin.conf Arquivo do munin.conf # Example configuration file for Munin, generated by 'make build' # The next three variables specifies where the location of the RRD # databases, the HTML output, logs and the lock/pid files. They all # must be writable by the user running munin-cron. They are all # defaulted to the values you see here. # dbdir /var/lib/munin htmldir /var/www/munin logdir /var/log/munin rundir /var/run/munin # # Where to look for the HTML templates # tmpldir /etc/munin/templates # (Exactly one) directory to include all files from. # includedir /etc/munin/munin-conf.d # Make graphs show values per minute instead of per second #graph_period minute # Graphics files are normaly generated by munin-graph, no matter if # the graphs are used or not. You can change this to # on-demand-graphing by following the instructions...

Wordpress Update e instalação de plugins

Image
Caso você queira facilitar sua vida na atualização do wordpress ou instalação de plug-ins ou até mesmo resolver problemas de uploads de fotos e outros, Ubuntu 14.04, Apache2, PHP5 O comando abaixo deve ser executado via ssh na pasta do site. sudo chown -R www-data:www-data /var/www/wordpress Execute o update Feito isso já fica operacional o update e instalação de plug-ins dentro da interface do wordpress.

Como aumentar o tamanho do upload no phpmyadmin

Image
"How to" aumentando o tamanho máximo de upload para base SQL no phpmyadmin. Ambiente Ubuntu Server 14.04 php5 apache2 e Mysql5.6. Como o phpmyadmin está ligado as configurações web do PHP, o aumento do tamanho máximo de upload é geral para todos os itens que trabalha junto com o PHP5. Abra o arquivo php.ini sudo vim /etc/php5/apache2/php.ini Procure a linha max file *(para procurar dentro do arquivo de configuração utilize a /"oque procura" e enter) ; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize upload_max_filesize = 2M No nosso exemplo aumentamos de 2MB para 50MB (sim tem clientes com base maiores que 2MB) Procure a linha post e edite! post_max_size = 8M Salve a configuração saia do arquivo, execute o restart do apache sudo service apache2 restart Verifique dentro do phpmyadmin