Phabricator is a free and open source collection of web applications that helps you to build your own software development platform for better software. And when you want to host Phabricator, you may need to create a virtual host for the access. In this article, you will learn how to create a virtual host on the apache server with commands for Phabricator.
For how to prepare your system and LAMP stack, and how to install Phabricator on an Alibaba Cloud Elastic Compute Service (ECS) CentOS 7 server, please go to Create Your Own Software Development Platform using Phabricator on CentOS 7.
And now Alibaba Cloud has good offers for easy-to-use high-performance virtual machines with a massive free data transfer. Just $2.50 a month makes you benefit from all advantages of SSD cloud server for your web applications through the new packages, which not only offer you SSD cloud server but also including a data transfer plan that you must need. Come and Check the packages!
After you have installed Phabricator on the apache server, you can create a new virtual host file with the following command.
nano /etc/httpd/conf.d/yourdomain.com.conf
Replace yourdomain.com
with your actual domain. Now add the following content into the file.
<VirtualHost *:80>
ServerName yourdomain.com
Redirect permanent / https://yourdomain.com/
TransferLog /var/log/httpd/yourdomain.com_access.log
ErrorLog /var/log/httpd/yourdomain.com_error.log
</VirtualHost>
<VirtualHost *:443>
ServerName yourdomain.com
DocumentRoot /var/www/phabricator/phabricator/webroot
ServerAdmin me@liptanbiswas.com
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/yourdomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/yourdomain.com/privkey.pem
RewriteEngine on
RewriteRule ^/rsrc/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
<Directory /var/www/phabricator/phabricator/webroot>
AllowOverride All
Require all granted
</Directory>
TransferLog /var/log/httpd/yourdomain.com_ssl_access.log
ErrorLog /var/log/httpd/yourdomain.com_ssl_error.log
</VirtualHost>
In the above configuration change yourdomain.com to your actual domain.
Finally, restart the apache server and MariaDB to apply all the changes that we just configured. You can do so using the following commands.
systemctl restart httpd
systemctl restart mariadb
You will need to disable SELinux otherwise, Phabricator won't be able to connect to the database. To temporary disable SELinux without restarting the server, run the following command.
setenforce 0
To access Redmine via your server’s IP address, you will be required to set up a virtual host.
Open the apache configuration file /etc/httpd/conf.d/welcome.conf
# sudo nano /etc/httpd/conf.d/welcome.conf
Remove all the code available in opened file.
Add the following lines of code in opened apache configuration file and press Ctrl+X, then type Y and then hit Enter.
<VirtualHost *:3000>
ServerName 47.89.180.149
DocumentRoot /var/www/html/public/
PassengerRoot /home/aareez/.rvm/gems/ruby-2.4.1/gems/passenger-5.3.1
PassengerRuby /home/aareez/.rvm/gems/ruby-2.4.1/wrappers/ruby
PassengerUser aareez
<Directory /var/www/html/public/>
Allow from all ExecCGI
Options -MultiViews
Require all granted
</Directory>
</VirtualHost>
Restart apache.
# sudo service httpd restart
After you have installed Varnish Cache, please create a new Apache virtual host to serve the application using your domain name.
sudo nano /etc/httpd/conf.d/shop.example.com.conf
Add the following content to the file.
<VirtualHost *:8080>
ServerName shop.example.com
DocumentRoot /var/www/magento2
<Directory /var/www/magento2>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Make sure you change shop.example.com with your actual domain name. Now, restart Varnish cache and Apache web servers.
sudo systemctl restart httpd
sudo systemctl restart varnish
In this article, you will learn the following processes:
Host monitoring is available for both Alibaba Cloud ECS servers, and virtual and physical machines provided by other vendors.
Host monitoring collects statistics of a diverse range of OS-related metrics by using the agent, allowing you to retrieve the server resource usage and obtain metrics for troubleshooting.
PaaS Android Operating System. It offers Android Virtual Machines with high quality display in your web browser as well as SSH and ADB access.
Array’s vxAG is the Ideal choice for AliCloud users who are seeking scalable and flexible secure access from PC, iOS and Android. Array’s vxAG provide AliCloud users the most reliable and secure access through SSL VPN.
An online computing service that offers elastic and secure virtual cloud servers to cater all your cloud hosting needs.
A virtual private cloud service that provides an isolated cloud network to operate resources in a secure environment.
2,599 posts | 762 followers
FollowAlibaba Clouder - January 10, 2019
Alibaba Tech - August 29, 2019
Alibaba Clouder - May 21, 2018
francisndungu - February 24, 2020
Alibaba Clouder - May 22, 2018
Alibaba Clouder - October 1, 2018
2,599 posts | 762 followers
FollowOver 20 million domain, free WHOIS privacy protection.
Learn MoreMore Posts by Alibaba Clouder