How to set up apache running on separate system OL7 to present trac wiki project












0















I need to somehow set up apache to present a content from tracd running on separate server.



I used following config definition:



# LB VIP1 - TRAC definition <VirtualHost "IP":8090>
# ServerName tracwiki.com
ServerAlias "IP of loadbalancer"
# ServerPath "/project/"
DocumentRoot "/pkg/moip/data/apache/docs" <Directory "/pkg/moip/data/apache/docs">
AllowOverride None
Options None
Require method GET HEAD POST
</Directory> RewriteRule ^/project_name/(.*) http://"IP of Application server":8000/project/$1 [L,P]
LogLevel warn core:info
ErrorLog /pkg/moip/logs/apache/error_TRAC.log
CustomLog /pkg/moip/logs/apache/access_TRAC.log common
Redirect /project https://tracwiki.com/project
# ProxyPreserveHost On
ProxyPass /project http://"IP of Application server":8000/project
ProxyPassReverse /project http://"IP of Application server":8000/project
Include /pkg/moip/apps/apache/conf/extra/limits.conf </VirtualHost>*


Unfortunately I still get a same message "content not found". Firewall between servers is opened via port 8000 (in direction web server to application server). Tracdeamon is running well on application server.



Package Version: 
Trac 1.2.3,
Genshi 0.7.1 (with speedups),
pysqlite 2.8.3,
Python 2.7.5 (default, Jul 3 2018, 06:28:28) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28.0.1)],
setuptools 0.9.8,
SQLite 3.7.17,
Subversion 1.7.14 (r1542130)


I also installed "flup" to use ajp protocols instead of http, but unfortunately I couldn't manage to properly start a gateway:



[trac-scripts]$ Traceback (most recent call last):   File "/home/lcuser/trac-scripts/ajp_to_wsgi_gateway", line 36, in <module>
from flup.server.ajp import WSGIServer File "build/bdist.linux-x86_64/egg/flup/server/ajp.py", line 91, in <module> File "build/bdist.linux-x86_64/egg/flup/server/ajp_base.py", line 42, in <module> ImportError: No module named _thread


I would appreciate any help.










share|improve this question





























    0















    I need to somehow set up apache to present a content from tracd running on separate server.



    I used following config definition:



    # LB VIP1 - TRAC definition <VirtualHost "IP":8090>
    # ServerName tracwiki.com
    ServerAlias "IP of loadbalancer"
    # ServerPath "/project/"
    DocumentRoot "/pkg/moip/data/apache/docs" <Directory "/pkg/moip/data/apache/docs">
    AllowOverride None
    Options None
    Require method GET HEAD POST
    </Directory> RewriteRule ^/project_name/(.*) http://"IP of Application server":8000/project/$1 [L,P]
    LogLevel warn core:info
    ErrorLog /pkg/moip/logs/apache/error_TRAC.log
    CustomLog /pkg/moip/logs/apache/access_TRAC.log common
    Redirect /project https://tracwiki.com/project
    # ProxyPreserveHost On
    ProxyPass /project http://"IP of Application server":8000/project
    ProxyPassReverse /project http://"IP of Application server":8000/project
    Include /pkg/moip/apps/apache/conf/extra/limits.conf </VirtualHost>*


    Unfortunately I still get a same message "content not found". Firewall between servers is opened via port 8000 (in direction web server to application server). Tracdeamon is running well on application server.



    Package Version: 
    Trac 1.2.3,
    Genshi 0.7.1 (with speedups),
    pysqlite 2.8.3,
    Python 2.7.5 (default, Jul 3 2018, 06:28:28) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28.0.1)],
    setuptools 0.9.8,
    SQLite 3.7.17,
    Subversion 1.7.14 (r1542130)


    I also installed "flup" to use ajp protocols instead of http, but unfortunately I couldn't manage to properly start a gateway:



    [trac-scripts]$ Traceback (most recent call last):   File "/home/lcuser/trac-scripts/ajp_to_wsgi_gateway", line 36, in <module>
    from flup.server.ajp import WSGIServer File "build/bdist.linux-x86_64/egg/flup/server/ajp.py", line 91, in <module> File "build/bdist.linux-x86_64/egg/flup/server/ajp_base.py", line 42, in <module> ImportError: No module named _thread


    I would appreciate any help.










    share|improve this question



























      0












      0








      0








      I need to somehow set up apache to present a content from tracd running on separate server.



      I used following config definition:



      # LB VIP1 - TRAC definition <VirtualHost "IP":8090>
      # ServerName tracwiki.com
      ServerAlias "IP of loadbalancer"
      # ServerPath "/project/"
      DocumentRoot "/pkg/moip/data/apache/docs" <Directory "/pkg/moip/data/apache/docs">
      AllowOverride None
      Options None
      Require method GET HEAD POST
      </Directory> RewriteRule ^/project_name/(.*) http://"IP of Application server":8000/project/$1 [L,P]
      LogLevel warn core:info
      ErrorLog /pkg/moip/logs/apache/error_TRAC.log
      CustomLog /pkg/moip/logs/apache/access_TRAC.log common
      Redirect /project https://tracwiki.com/project
      # ProxyPreserveHost On
      ProxyPass /project http://"IP of Application server":8000/project
      ProxyPassReverse /project http://"IP of Application server":8000/project
      Include /pkg/moip/apps/apache/conf/extra/limits.conf </VirtualHost>*


      Unfortunately I still get a same message "content not found". Firewall between servers is opened via port 8000 (in direction web server to application server). Tracdeamon is running well on application server.



      Package Version: 
      Trac 1.2.3,
      Genshi 0.7.1 (with speedups),
      pysqlite 2.8.3,
      Python 2.7.5 (default, Jul 3 2018, 06:28:28) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28.0.1)],
      setuptools 0.9.8,
      SQLite 3.7.17,
      Subversion 1.7.14 (r1542130)


      I also installed "flup" to use ajp protocols instead of http, but unfortunately I couldn't manage to properly start a gateway:



      [trac-scripts]$ Traceback (most recent call last):   File "/home/lcuser/trac-scripts/ajp_to_wsgi_gateway", line 36, in <module>
      from flup.server.ajp import WSGIServer File "build/bdist.linux-x86_64/egg/flup/server/ajp.py", line 91, in <module> File "build/bdist.linux-x86_64/egg/flup/server/ajp_base.py", line 42, in <module> ImportError: No module named _thread


      I would appreciate any help.










      share|improve this question
















      I need to somehow set up apache to present a content from tracd running on separate server.



      I used following config definition:



      # LB VIP1 - TRAC definition <VirtualHost "IP":8090>
      # ServerName tracwiki.com
      ServerAlias "IP of loadbalancer"
      # ServerPath "/project/"
      DocumentRoot "/pkg/moip/data/apache/docs" <Directory "/pkg/moip/data/apache/docs">
      AllowOverride None
      Options None
      Require method GET HEAD POST
      </Directory> RewriteRule ^/project_name/(.*) http://"IP of Application server":8000/project/$1 [L,P]
      LogLevel warn core:info
      ErrorLog /pkg/moip/logs/apache/error_TRAC.log
      CustomLog /pkg/moip/logs/apache/access_TRAC.log common
      Redirect /project https://tracwiki.com/project
      # ProxyPreserveHost On
      ProxyPass /project http://"IP of Application server":8000/project
      ProxyPassReverse /project http://"IP of Application server":8000/project
      Include /pkg/moip/apps/apache/conf/extra/limits.conf </VirtualHost>*


      Unfortunately I still get a same message "content not found". Firewall between servers is opened via port 8000 (in direction web server to application server). Tracdeamon is running well on application server.



      Package Version: 
      Trac 1.2.3,
      Genshi 0.7.1 (with speedups),
      pysqlite 2.8.3,
      Python 2.7.5 (default, Jul 3 2018, 06:28:28) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28.0.1)],
      setuptools 0.9.8,
      SQLite 3.7.17,
      Subversion 1.7.14 (r1542130)


      I also installed "flup" to use ajp protocols instead of http, but unfortunately I couldn't manage to properly start a gateway:



      [trac-scripts]$ Traceback (most recent call last):   File "/home/lcuser/trac-scripts/ajp_to_wsgi_gateway", line 36, in <module>
      from flup.server.ajp import WSGIServer File "build/bdist.linux-x86_64/egg/flup/server/ajp.py", line 91, in <module> File "build/bdist.linux-x86_64/egg/flup/server/ajp_base.py", line 42, in <module> ImportError: No module named _thread


      I would appreciate any help.







      linux apache-http-server python svn trac






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 15 at 17:57









      Mr Shunz

      1,76311817




      1,76311817










      asked Jan 15 at 14:01









      Peter KozmaPeter Kozma

      11




      11






















          1 Answer
          1






          active

          oldest

          votes


















          0














          I solved this issue. As I expected I had a problem in my VirtualHost definition.
          I needed only add specific "rewrite rule" in my existing definition:



          RewriteRule ^/project_name(.*) http://"IP of Application server1":8000/project_name$1 [L,P]


          Correctly should be like this:



          <VirtualHost "IP":8090>
          ServerName tracwiki.com
          ServerAlias "IP of loadbalancer"

          DocumentRoot "/pkg/moip/data/apache/docs"
          <Directory "/pkg/moip/data/apache/docs">
          AllowOverride None
          Options None
          Require method GET HEAD POST
          </Directory>

          #Prevent TRACK/TRACE requests
          RewriteEngine on
          RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
          RewriteRule .* - [F]
          RewriteRule [^a-zA-Z0-9|;|/| |?|:|Q|&|=|+|$|,|-|_|.|!|~|*|(|)] - [F]
          RewriteRule ^/project_name(.*) http://"IP of Application server1":8000/project_name$1 [L,P]

          LogLevel warn core:info ErrorLog /pkg/moip/logs/apache/error.log
          CustomLog /pkg/moip/logs/apache/access.log common

          <IfModule mod_proxy_balancer.c>
          Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
          <Proxy balancer://cluster>
          BalancerMember http://"IP of Application server2":21180 route=App_1 keepalive=on
          BalancerMember http://"IP of Application server3":21180 route=App_2 keepalive=on

          ProxySet stickysession=ROUTEID lbmethod=byrequests
          </Proxy>
          ProxyPass / balancer://cluster/
          ProxyPassReverse / balancer://cluster/
          </IfModule>
          Include /pkg/moip/pepsig/apps/apache/conf/extra/limits.conf </VirtualHost>*


          "Server1" -- used exclusively for TRAC WIKI purposes



          "Server2" + "Server3" -- used only for JBOSS instances (application purposes).






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1394527%2fhow-to-set-up-apache-running-on-separate-system-ol7-to-present-trac-wiki-project%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I solved this issue. As I expected I had a problem in my VirtualHost definition.
            I needed only add specific "rewrite rule" in my existing definition:



            RewriteRule ^/project_name(.*) http://"IP of Application server1":8000/project_name$1 [L,P]


            Correctly should be like this:



            <VirtualHost "IP":8090>
            ServerName tracwiki.com
            ServerAlias "IP of loadbalancer"

            DocumentRoot "/pkg/moip/data/apache/docs"
            <Directory "/pkg/moip/data/apache/docs">
            AllowOverride None
            Options None
            Require method GET HEAD POST
            </Directory>

            #Prevent TRACK/TRACE requests
            RewriteEngine on
            RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
            RewriteRule .* - [F]
            RewriteRule [^a-zA-Z0-9|;|/| |?|:|Q|&|=|+|$|,|-|_|.|!|~|*|(|)] - [F]
            RewriteRule ^/project_name(.*) http://"IP of Application server1":8000/project_name$1 [L,P]

            LogLevel warn core:info ErrorLog /pkg/moip/logs/apache/error.log
            CustomLog /pkg/moip/logs/apache/access.log common

            <IfModule mod_proxy_balancer.c>
            Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
            <Proxy balancer://cluster>
            BalancerMember http://"IP of Application server2":21180 route=App_1 keepalive=on
            BalancerMember http://"IP of Application server3":21180 route=App_2 keepalive=on

            ProxySet stickysession=ROUTEID lbmethod=byrequests
            </Proxy>
            ProxyPass / balancer://cluster/
            ProxyPassReverse / balancer://cluster/
            </IfModule>
            Include /pkg/moip/pepsig/apps/apache/conf/extra/limits.conf </VirtualHost>*


            "Server1" -- used exclusively for TRAC WIKI purposes



            "Server2" + "Server3" -- used only for JBOSS instances (application purposes).






            share|improve this answer




























              0














              I solved this issue. As I expected I had a problem in my VirtualHost definition.
              I needed only add specific "rewrite rule" in my existing definition:



              RewriteRule ^/project_name(.*) http://"IP of Application server1":8000/project_name$1 [L,P]


              Correctly should be like this:



              <VirtualHost "IP":8090>
              ServerName tracwiki.com
              ServerAlias "IP of loadbalancer"

              DocumentRoot "/pkg/moip/data/apache/docs"
              <Directory "/pkg/moip/data/apache/docs">
              AllowOverride None
              Options None
              Require method GET HEAD POST
              </Directory>

              #Prevent TRACK/TRACE requests
              RewriteEngine on
              RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
              RewriteRule .* - [F]
              RewriteRule [^a-zA-Z0-9|;|/| |?|:|Q|&|=|+|$|,|-|_|.|!|~|*|(|)] - [F]
              RewriteRule ^/project_name(.*) http://"IP of Application server1":8000/project_name$1 [L,P]

              LogLevel warn core:info ErrorLog /pkg/moip/logs/apache/error.log
              CustomLog /pkg/moip/logs/apache/access.log common

              <IfModule mod_proxy_balancer.c>
              Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
              <Proxy balancer://cluster>
              BalancerMember http://"IP of Application server2":21180 route=App_1 keepalive=on
              BalancerMember http://"IP of Application server3":21180 route=App_2 keepalive=on

              ProxySet stickysession=ROUTEID lbmethod=byrequests
              </Proxy>
              ProxyPass / balancer://cluster/
              ProxyPassReverse / balancer://cluster/
              </IfModule>
              Include /pkg/moip/pepsig/apps/apache/conf/extra/limits.conf </VirtualHost>*


              "Server1" -- used exclusively for TRAC WIKI purposes



              "Server2" + "Server3" -- used only for JBOSS instances (application purposes).






              share|improve this answer


























                0












                0








                0







                I solved this issue. As I expected I had a problem in my VirtualHost definition.
                I needed only add specific "rewrite rule" in my existing definition:



                RewriteRule ^/project_name(.*) http://"IP of Application server1":8000/project_name$1 [L,P]


                Correctly should be like this:



                <VirtualHost "IP":8090>
                ServerName tracwiki.com
                ServerAlias "IP of loadbalancer"

                DocumentRoot "/pkg/moip/data/apache/docs"
                <Directory "/pkg/moip/data/apache/docs">
                AllowOverride None
                Options None
                Require method GET HEAD POST
                </Directory>

                #Prevent TRACK/TRACE requests
                RewriteEngine on
                RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
                RewriteRule .* - [F]
                RewriteRule [^a-zA-Z0-9|;|/| |?|:|Q|&|=|+|$|,|-|_|.|!|~|*|(|)] - [F]
                RewriteRule ^/project_name(.*) http://"IP of Application server1":8000/project_name$1 [L,P]

                LogLevel warn core:info ErrorLog /pkg/moip/logs/apache/error.log
                CustomLog /pkg/moip/logs/apache/access.log common

                <IfModule mod_proxy_balancer.c>
                Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
                <Proxy balancer://cluster>
                BalancerMember http://"IP of Application server2":21180 route=App_1 keepalive=on
                BalancerMember http://"IP of Application server3":21180 route=App_2 keepalive=on

                ProxySet stickysession=ROUTEID lbmethod=byrequests
                </Proxy>
                ProxyPass / balancer://cluster/
                ProxyPassReverse / balancer://cluster/
                </IfModule>
                Include /pkg/moip/pepsig/apps/apache/conf/extra/limits.conf </VirtualHost>*


                "Server1" -- used exclusively for TRAC WIKI purposes



                "Server2" + "Server3" -- used only for JBOSS instances (application purposes).






                share|improve this answer













                I solved this issue. As I expected I had a problem in my VirtualHost definition.
                I needed only add specific "rewrite rule" in my existing definition:



                RewriteRule ^/project_name(.*) http://"IP of Application server1":8000/project_name$1 [L,P]


                Correctly should be like this:



                <VirtualHost "IP":8090>
                ServerName tracwiki.com
                ServerAlias "IP of loadbalancer"

                DocumentRoot "/pkg/moip/data/apache/docs"
                <Directory "/pkg/moip/data/apache/docs">
                AllowOverride None
                Options None
                Require method GET HEAD POST
                </Directory>

                #Prevent TRACK/TRACE requests
                RewriteEngine on
                RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
                RewriteRule .* - [F]
                RewriteRule [^a-zA-Z0-9|;|/| |?|:|Q|&|=|+|$|,|-|_|.|!|~|*|(|)] - [F]
                RewriteRule ^/project_name(.*) http://"IP of Application server1":8000/project_name$1 [L,P]

                LogLevel warn core:info ErrorLog /pkg/moip/logs/apache/error.log
                CustomLog /pkg/moip/logs/apache/access.log common

                <IfModule mod_proxy_balancer.c>
                Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
                <Proxy balancer://cluster>
                BalancerMember http://"IP of Application server2":21180 route=App_1 keepalive=on
                BalancerMember http://"IP of Application server3":21180 route=App_2 keepalive=on

                ProxySet stickysession=ROUTEID lbmethod=byrequests
                </Proxy>
                ProxyPass / balancer://cluster/
                ProxyPassReverse / balancer://cluster/
                </IfModule>
                Include /pkg/moip/pepsig/apps/apache/conf/extra/limits.conf </VirtualHost>*


                "Server1" -- used exclusively for TRAC WIKI purposes



                "Server2" + "Server3" -- used only for JBOSS instances (application purposes).







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 16 at 12:01









                Peter KozmaPeter Kozma

                11




                11






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1394527%2fhow-to-set-up-apache-running-on-separate-system-ol7-to-present-trac-wiki-project%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Index of /

                    Tribalistas

                    Listed building