Skip to content

Instantly share code, notes, and snippets.

@viniciusvts
Last active September 18, 2023 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viniciusvts/23a506adf0c70cf75eed308300e45e80 to your computer and use it in GitHub Desktop.
Save viniciusvts/23a506adf0c70cf75eed308300e45e80 to your computer and use it in GitHub Desktop.
how-to

instalar o apache web server

pelo gerenciador de pacotes

pacman -S apache

configurações:

  1. editar o arquivo /etc/httpd/conf/httpd.conf
  • Adicionar Listen 443 após Listen 80

  • Definir email administrador do sistema ServerAdmin you@example.com

  • Definir o diretório root DocumentRoot "/srv/http"

  • Habilitar .htaacess file no diretório "<Directory "/srv/http">" definindo AllowOverride All

  • Habilitar mod_rewrite LoadModule rewrite_module modules/mod_rewrite.so

php

instalar pelo gerenciador de pacotes pacman -S php php-cgi php-apache

  1. editar o arquivo /etc/httpd/conf/httpd.conf
  • comentar: #LoadModule mpm_event_module modules/mod_mpm_event.so

  • descomentar: LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

  • adicionar ao final da lista de LoadModule: LoadModule php7_module modules/libphp7.so e AddHandler php7-script .php

  • adicionar ao final da lista de Include: Include conf/extra/php7_module.conf

  • Habilitar extensão mysqli (ou qualquer outra nativa): cd /etc/php/php.ini e descomentar a linha: extension=mysqli

  1. Limite de arquivos e processamento php
  • Alterar post_max_size

  • Alterar upload_max_filesize

Restart Apache web server

systemctl restart apache

Habilitar http2

  1. To enable HTTP/2 support, uncomment the following line in httpd.conf: LoadModule http2_module modules/mod_http2.so

And add the following line: Protocols h2 http/1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment