Skip to content

Instantly share code, notes, and snippets.

@gamorales
Created August 23, 2020 13:31
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 gamorales/b09d78a0268d9f3957fc42dea212a2d8 to your computer and use it in GitHub Desktop.
Save gamorales/b09d78a0268d9f3957fc42dea212a2d8 to your computer and use it in GitHub Desktop.
Register a new site in apache.
# Crear nuevo archivo de configuración en /etc/apache2/sites-available/php-site.conf
<VirtualHost *:80>
ServerName www.andrea.pos
ServerAlias andrea.pos
DocumentRoot /var/www/html/pos_andrea/posMain/application
<Directory /var/www/html/pos_andrea/posMain/application>
AllowOverride All
Options FollowSymLinks MultiViews
Order allow,deny
Allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /app.php [QSA,L]
</IfModule>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error_pos.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access_pos.log combined
</VirtualHost>
# Agregar en /etc/hosts:
# 127.0.0.1 andrea.pos
# sudo a2ensite pos.conf
# sudo service apache2 reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment