Apache2 howto serve different location for specific path in urlapache2 force proxy for specific url on a...

Is Draco canonically good-looking?

Meth dealer reference in Family Guy

What happens if a wizard reaches level 20 but has no 3rd-level spells that they can use with the Signature Spells feature?

Can a person refuse a presidential pardon?

How can I improve my fireworks photography?

Eww, those bytes are gross

Could quantum mechanics be necessary to analyze some biology scenarios?

Why is my solution for the partial pressures of two different gases incorrect?

What is the wife of a henpecked husband called?

Do authors have to be politically correct in article-writing?

Should I choose Itemized or Standard deduction?

Crystal compensation for temp and voltage

A Wacky, Wacky Chessboard (That Makes No Sense)

LTSpice: When running a linear AC simulation, how to view the voltage ratio between two voltages?

If all harmonics are generated by plucking, how does a guitar string produce a pure frequency sound?

Why is this code uniquely decodable?

Why can I easily sing or whistle a tune I've just heard, but not as easily reproduce it on an instrument?

Incompressible fluid definition

I am on the US no-fly list. What can I do in order to be allowed on flights which go through US airspace?

Avoiding morning and evening handshakes

How to approximate rolls for potions of healing using only d6's?

Why is c4 a better move in this position?

Do commercial flights continue with an engine out?

Am I a Rude Number?



Apache2 howto serve different location for specific path in url


apache2 force proxy for specific url on a subdomainRedirecting a specific URL to a different vhost in apacheApache2 Doesn't Serve Subdomain Aliashowto serve different local index page with multiple virtualhostsCan't access apache by port 80 from externalMod - Rewrite / .htaccess Issue with Apache 2.4.12Configure Apache2 sites pathReverse Proxy on Apache same domain different pathApache reverse proxy works for separate subdomain, but not for specific urlRewrite apache2 location header response













1















I got a Virtualhost serving my application by ProxyPass and it works fine. now i want to serve an english version of my service using a simple Wordpress under '/en' route. assuming the Wordpress located in 'home/path/to/wp' how can i achieve this?
here's my current config under /etc/apache2/sites-enabled/ :



<VirtualHost xx.xx.xx.xx:443>
ServerName xx.com
ServerAlias www.xx.com
SSLEngine on
.
.
.
ProxyPass /en !
<Directory home/path/to/wp>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
#DocumentRoot "home/path/to/wp"

AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddType application/x-httpd-php7.2 .php7.2
</Directory>
Redirect /en home/path/to/wp
ProxyPass / http://0.0.0.0:3000/
ProxyPassReverse / http://0.0.0.0:3000/

#RewriteEngine on
#RewriteRule ^/en/(.*)$ /home/kerman/public_html [L,PT]
#Alias /en /home/kerman/public_html
</VirtualHost>


as you see in the code I've tried Redirect, Alias and Rewrite but none of them works fine.



what is the practical workaround for this situation?










share|improve this question







New contributor




Alireza Kian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    1















    I got a Virtualhost serving my application by ProxyPass and it works fine. now i want to serve an english version of my service using a simple Wordpress under '/en' route. assuming the Wordpress located in 'home/path/to/wp' how can i achieve this?
    here's my current config under /etc/apache2/sites-enabled/ :



    <VirtualHost xx.xx.xx.xx:443>
    ServerName xx.com
    ServerAlias www.xx.com
    SSLEngine on
    .
    .
    .
    ProxyPass /en !
    <Directory home/path/to/wp>
    Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
    allow from all
    #DocumentRoot "home/path/to/wp"

    AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
    Require all granted
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php7.2 .php7.2
    </Directory>
    Redirect /en home/path/to/wp
    ProxyPass / http://0.0.0.0:3000/
    ProxyPassReverse / http://0.0.0.0:3000/

    #RewriteEngine on
    #RewriteRule ^/en/(.*)$ /home/kerman/public_html [L,PT]
    #Alias /en /home/kerman/public_html
    </VirtualHost>


    as you see in the code I've tried Redirect, Alias and Rewrite but none of them works fine.



    what is the practical workaround for this situation?










    share|improve this question







    New contributor




    Alireza Kian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      1












      1








      1








      I got a Virtualhost serving my application by ProxyPass and it works fine. now i want to serve an english version of my service using a simple Wordpress under '/en' route. assuming the Wordpress located in 'home/path/to/wp' how can i achieve this?
      here's my current config under /etc/apache2/sites-enabled/ :



      <VirtualHost xx.xx.xx.xx:443>
      ServerName xx.com
      ServerAlias www.xx.com
      SSLEngine on
      .
      .
      .
      ProxyPass /en !
      <Directory home/path/to/wp>
      Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
      allow from all
      #DocumentRoot "home/path/to/wp"

      AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
      Require all granted
      AddType application/x-httpd-php .php
      AddType application/x-httpd-php7.2 .php7.2
      </Directory>
      Redirect /en home/path/to/wp
      ProxyPass / http://0.0.0.0:3000/
      ProxyPassReverse / http://0.0.0.0:3000/

      #RewriteEngine on
      #RewriteRule ^/en/(.*)$ /home/kerman/public_html [L,PT]
      #Alias /en /home/kerman/public_html
      </VirtualHost>


      as you see in the code I've tried Redirect, Alias and Rewrite but none of them works fine.



      what is the practical workaround for this situation?










      share|improve this question







      New contributor




      Alireza Kian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I got a Virtualhost serving my application by ProxyPass and it works fine. now i want to serve an english version of my service using a simple Wordpress under '/en' route. assuming the Wordpress located in 'home/path/to/wp' how can i achieve this?
      here's my current config under /etc/apache2/sites-enabled/ :



      <VirtualHost xx.xx.xx.xx:443>
      ServerName xx.com
      ServerAlias www.xx.com
      SSLEngine on
      .
      .
      .
      ProxyPass /en !
      <Directory home/path/to/wp>
      Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
      allow from all
      #DocumentRoot "home/path/to/wp"

      AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
      Require all granted
      AddType application/x-httpd-php .php
      AddType application/x-httpd-php7.2 .php7.2
      </Directory>
      Redirect /en home/path/to/wp
      ProxyPass / http://0.0.0.0:3000/
      ProxyPassReverse / http://0.0.0.0:3000/

      #RewriteEngine on
      #RewriteRule ^/en/(.*)$ /home/kerman/public_html [L,PT]
      #Alias /en /home/kerman/public_html
      </VirtualHost>


      as you see in the code I've tried Redirect, Alias and Rewrite but none of them works fine.



      what is the practical workaround for this situation?







      apache-2.4 virtualhost






      share|improve this question







      New contributor




      Alireza Kian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Alireza Kian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Alireza Kian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 12 hours ago









      Alireza KianAlireza Kian

      61




      61




      New contributor




      Alireza Kian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Alireza Kian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Alireza Kian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          1














          You have tried everything, but nothing quite properly i.e. following the documentation.



          First, your file system paths must be absolute paths starting from the root /. There's now many paths in your question, but to keep things simple let's just assume that your WordPress path is /home/kerman/public_html/en and everything else gets proxied to the backend :3000. ( #Comments are now used as comments.)



          <VirtualHost *:443>
          ServerName example.com
          ServerAlias www.example.com

          SSLEngine on
          # and here the keys & co.

          DocumentRoot /home/kerman/public_html

          ProxyPass / http://127.0.0.1:3000/
          ProxyPassReverse / http://127.0.0.1:3000/

          # /en under the DocumentRoot i.e. /home/kerman/public_html/en
          ProxyPass /en !

          <Directory /home/kerman/public_html>
          Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
          # All is All already: no need for a list
          AllowOverride All

          # Allow is deprecated, and this already does it
          Require all granted
          </Directory>
          </VirtualHost>


          No need for workarounds.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "2"
            };
            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
            });


            }
            });






            Alireza Kian is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f956535%2fapache2-howto-serve-different-location-for-specific-path-in-url%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









            1














            You have tried everything, but nothing quite properly i.e. following the documentation.



            First, your file system paths must be absolute paths starting from the root /. There's now many paths in your question, but to keep things simple let's just assume that your WordPress path is /home/kerman/public_html/en and everything else gets proxied to the backend :3000. ( #Comments are now used as comments.)



            <VirtualHost *:443>
            ServerName example.com
            ServerAlias www.example.com

            SSLEngine on
            # and here the keys & co.

            DocumentRoot /home/kerman/public_html

            ProxyPass / http://127.0.0.1:3000/
            ProxyPassReverse / http://127.0.0.1:3000/

            # /en under the DocumentRoot i.e. /home/kerman/public_html/en
            ProxyPass /en !

            <Directory /home/kerman/public_html>
            Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
            # All is All already: no need for a list
            AllowOverride All

            # Allow is deprecated, and this already does it
            Require all granted
            </Directory>
            </VirtualHost>


            No need for workarounds.






            share|improve this answer




























              1














              You have tried everything, but nothing quite properly i.e. following the documentation.



              First, your file system paths must be absolute paths starting from the root /. There's now many paths in your question, but to keep things simple let's just assume that your WordPress path is /home/kerman/public_html/en and everything else gets proxied to the backend :3000. ( #Comments are now used as comments.)



              <VirtualHost *:443>
              ServerName example.com
              ServerAlias www.example.com

              SSLEngine on
              # and here the keys & co.

              DocumentRoot /home/kerman/public_html

              ProxyPass / http://127.0.0.1:3000/
              ProxyPassReverse / http://127.0.0.1:3000/

              # /en under the DocumentRoot i.e. /home/kerman/public_html/en
              ProxyPass /en !

              <Directory /home/kerman/public_html>
              Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
              # All is All already: no need for a list
              AllowOverride All

              # Allow is deprecated, and this already does it
              Require all granted
              </Directory>
              </VirtualHost>


              No need for workarounds.






              share|improve this answer


























                1












                1








                1







                You have tried everything, but nothing quite properly i.e. following the documentation.



                First, your file system paths must be absolute paths starting from the root /. There's now many paths in your question, but to keep things simple let's just assume that your WordPress path is /home/kerman/public_html/en and everything else gets proxied to the backend :3000. ( #Comments are now used as comments.)



                <VirtualHost *:443>
                ServerName example.com
                ServerAlias www.example.com

                SSLEngine on
                # and here the keys & co.

                DocumentRoot /home/kerman/public_html

                ProxyPass / http://127.0.0.1:3000/
                ProxyPassReverse / http://127.0.0.1:3000/

                # /en under the DocumentRoot i.e. /home/kerman/public_html/en
                ProxyPass /en !

                <Directory /home/kerman/public_html>
                Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
                # All is All already: no need for a list
                AllowOverride All

                # Allow is deprecated, and this already does it
                Require all granted
                </Directory>
                </VirtualHost>


                No need for workarounds.






                share|improve this answer













                You have tried everything, but nothing quite properly i.e. following the documentation.



                First, your file system paths must be absolute paths starting from the root /. There's now many paths in your question, but to keep things simple let's just assume that your WordPress path is /home/kerman/public_html/en and everything else gets proxied to the backend :3000. ( #Comments are now used as comments.)



                <VirtualHost *:443>
                ServerName example.com
                ServerAlias www.example.com

                SSLEngine on
                # and here the keys & co.

                DocumentRoot /home/kerman/public_html

                ProxyPass / http://127.0.0.1:3000/
                ProxyPassReverse / http://127.0.0.1:3000/

                # /en under the DocumentRoot i.e. /home/kerman/public_html/en
                ProxyPass /en !

                <Directory /home/kerman/public_html>
                Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
                # All is All already: no need for a list
                AllowOverride All

                # Allow is deprecated, and this already does it
                Require all granted
                </Directory>
                </VirtualHost>


                No need for workarounds.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 7 hours ago









                Esa JokinenEsa Jokinen

                23.2k23258




                23.2k23258






















                    Alireza Kian is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    Alireza Kian is a new contributor. Be nice, and check out our Code of Conduct.













                    Alireza Kian is a new contributor. Be nice, and check out our Code of Conduct.












                    Alireza Kian is a new contributor. Be nice, and check out our Code of Conduct.
















                    Thanks for contributing an answer to Server Fault!


                    • 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%2fserverfault.com%2fquestions%2f956535%2fapache2-howto-serve-different-location-for-specific-path-in-url%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

                    Фонтен-ла-Гаярд Зміст Демографія | Економіка | Посилання |...

                    Список ссавців Італії Природоохоронні статуси | Список |...

                    Маріан Котлеба Зміст Життєпис | Політичні погляди |...