A
A
Abram2016-05-25 17:15:08
Apache HTTP Server
Abram, 2016-05-25 17:15:08

How to configure apache to work redmine on ip:port?

From the fourth time I was able to install and run redmine on vds.
I did it according to the instructions, https ://mihanentalpo.me/2014/07/%D1%83%D1%81%D1%82...
for tests, but Apache requires fine-tuning by hand, about which I could not find a manual.
The author recommends settings:
ServerName redmine.mihanentalpo.me
DocumentRoot /usr/local/share/redmine/public
AllowOverride all
Options -MultiViews
Where the future 3rd level domain is explicitly specified.
And I need redmine to open on ip:3000
How to implement this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2016-05-25
@xmoonlight

listen ip:3000

C
CityCat4, 2016-05-25
@CityCat4

Here is the redmine vhost I am using. Removed only access ACLs and fixed some things

Listen *:3000

<VirtualHost 10.8.1.1:80>
    ServerName redmine.server.my
    ServerAdmin [email protected]
    
    CustomLog /var/log/httpd/redmine/access common
    ErrorLog /var/log/httpd/redmine/httpd
    
    DocumentRoot /var/www/vhosts/redmine/public/

    MaxRequestLen 20971520    

    RailsEnv production
    
    <Directory "/var/www/vhosts/redmine/public/">
            Options Indexes ExecCGI FollowSymLinks
            AllowOverride all

            Order deny,allow
            Deny from all
            
            Allow from 127.0.0.1
            Allow from 10.8.1.0/255.255.255.0

    </Directory>
</VirtualHost>

In addition, you will need mod_passenger and mod_fcgid. I set it up for a long time, according to the manuals on the network.
mod_passenger config (passenger.conf file)
LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-4.0.36/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
   PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-4.0.36
   PassengerDefaultRuby /usr/local/bin/ruby
</IfModule>

# Remove HTTP Headers
Header always unset "X-Powered-By"
Header always unset "X-Rack-Cache"
Header always unset "X-Content-Digest"
Header always unset "X-Runtime"

# Tuning of Passenger
PassengerMaxPoolSize 20
PassengerMaxInstancesPerApp 4
PassengerPoolIdleTime 3600
PassengerHighPerformance on
PassengerStatThrottleRate 10
PassengerMaxPreloaderIdleTime 0

PassengerLogLevel 0
PassengerDebugLogFile /var/www/log/passenger

RailsSpawnMethod smart
RailsAppSpawnerIdleTime 86400


# ServerName Host:Port
ServerName redmine.server.my:80

mod_fcgid config (file fcgid.conf)
LoadModule fcgid_module /usr/lib64/httpd/modules/mod_fcgid.so

# Use FastCGI to process .fcg .fcgi & .fpl scripts
AddHandler fcgid-script fcg fcgi fpl

# Sane place to put sockets and shared memory file
FcgidIPCDir /var/run/mod_fcgid
FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm

Of course, I do not pretend to be unique or correct. It just works for me :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question