2016年11月15日 星期二

[Apache][Archlinux] Remind can use apache to browser

 Apache
+-----------------------------------------------+
|                                               |
|                                               |
|                                               |
|                                               |
|        Load Passenger module                  |
|       +-----------------------------+         |
|       | 1. where is passenger       |         |
|       | 2. where is ruby (bin file) |         |
|       |                             |         |
|       +-----------------------------+         |
|                                               |
+-----------------------------------------------+


Please install gcc zlibc curl make first

Install passenger - A fast and robust web server and application server for Ruby
gem install passenger


Install Apache Passenger module
$ passenger-install-apache2-module



Create new configuration file for including into apache configuration file.
vim /etc/httpd/conf/redmine.conf
LoadModule passenger_module /home/freeman/APP/RUBY/lib/ruby/gems/2.3.0/gems/passenger-5.0.30/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>

# passenger location
    PassengerRoot /home/freeman/APP/RUBY/lib/ruby/gems/2.3.0/gems/passenger-5.0.30  

# ruby bin file

    PassengerRuby /home/freeman/APP/RUBY/bin/ruby     
</IfModule>

NameVirtualHost *:8080

<VirtualHost *:8080>

# If root fold different, this row need to change
  DocumentRoot /home/freeman/webs/redmine-work/public  
  RailsEnv production
  ErrorLog /var/log/httpd/rails_error_log
  CustomLog /var/log/httpd/rails_access_log common
</VirtualHost>



NameVirtualHost *:8090

<VirtualHost *:8090>

# If root fold different, this row need to change
  DocumentRoot /home/freeman/webs/Learning/public
  RailsEnv production
  ErrorLog /var/log/httpd/rails_error_log
  CustomLog /var/log/httpd/rails_access_log common
</VirtualHost> 


vim /etc/httpd/conf/httpd.conf
Add following code into httpd.conf
# Open two port at apache
Listen 80
Listen 8080
Listen 8090
# Include ruby settings
Include conf/redmine.conf


Start apache
sudo systemctl start httpd


Reference:

Q:
An error occurred on the page you were trying to access

A:
cd redmine
chmod -R 755 files log tmp public/plugin_assets

systemctl restart httpd

Reference:

0 意見:

張貼留言