Last active
October 18, 2016 17:30
-
-
Save abbotto/231cdabae6c8e11bd9da to your computer and use it in GitHub Desktop.
Antergos - Change Apache Webroot
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
INSTALL: | |
sudo pacman --noconfirm -S apache php php-apache | |
RUN THIS COMMAND: | |
sudo nano /etc/httpd/conf/httpd.conf | |
EDIT THESE LINES IN THE /etc/httpd/conf/httpd.conf FILE: | |
- Add: LoadModule php5_module modules/libphp5.so | |
- Add: Include conf/extra/php5_module.conf | |
- Update: ServerName localhost:80 | |
- Comment: LoadModule mpm_event_module modules/mod_mpm_event.so | |
- Uncomment: LoadModule mpm_prefork_module modules/mod_mpm_prefork.so | |
- Uncomment: LoadModule vhost_alias_module modules/mod_vhost_alias.so | |
- Uncomment: LoadModule userdir_module modules/mod_userdir.so | |
- Uncomment: LoadModule alias_module modules/mod_alias.so | |
- Uncomment: LoadModule rewrite_module modules/mod_rewrite.so | |
- Uncomment Include conf/extra/httpd-vhosts.conf | |
- In DocumentRoot Directory block change 'Options Indexes FollowSymLinks' TO 'Options FollowSymLinks Multiviews Indexes' | |
- In DocumentRoot Directory block change 'AllowOverride None' TO 'AllowOverride All' | |
- Change DocumentRoot and DocumentRoot Directory to /YOUR/CUSTOM/DIRECTORY | |
- Look for '<IfModule unixd_module>' and change the user/group to the your username and usergroup | |
RUN THIS COMMAND: | |
sudo nano /etc/httpd/conf/extra/httpd-vhosts.conf | |
ADD THE FOLLOWING SECTION TO THE httpd-vhosts.conf FILE: | |
<VirtualHost *:80> | |
ServerName localhost | |
DocumentRoot "/YOUR/CUSTOM/DIRECTORY/" | |
</VirtualHost> | |
RUN THIS COMMAND: | |
sudo nano /etc/php/php.ini | |
# Change open_basedir to: | |
open_basedir=/srv/http/:/home/:/tmp/:/usr/share/pear/:/YOUR/CUSTOM/DIRECTORY/ | |
RUN THE FOLLOWING COMMAND: | |
sudo apachectl restart | |
Composer Setup | |
Step 1 - Editing your php.ini | |
Un-comment extension=phar.so | |
Un-comment extension=openssl.so | |
Go to open_basedir declaration (line 309 for me) - Add ":/user/local/bin/:/root/" to the end | |
Step 2 - Download & Install Composer (www.getcomposer.com) | |
curl -sS https://getcomposer.org/installer | php | |
(sudo) mv composer.phar /usr/local/bin/composer | |
Step 3 - Restart Httpd Server | |
sudo systemctl restart httpd | |
Step 4 - Update Composer (Recommended) | |
(sudo) composer self-update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment