Domain leads to Apache default page instead of the desired page Announcing the arrival of...

How come Sam didn't become Lord of Horn Hill?

Can any chord be converted to its roman numeral equivalent?

Check which numbers satisfy the condition [A*B*C = A! + B! + C!]

How do I stop a creek from eroding my steep embankment?

Why was the term "discrete" used in discrete logarithm?

How does the particle を relate to the verb 行く in the structure「A を + B に行く」?

Error "illegal generic type for instanceof" when using local classes

3 doors, three guards, one stone

How widely used is the term Treppenwitz? Is it something that most Germans know?

Bete Noir -- no dairy

Is there a problem creating Diff Backups every hour instead of Logs and DIffs?

Extract all GPU name, model and GPU ram

When do you get frequent flier miles - when you buy, or when you fly?

The logistics of corpse disposal

How to answer "Have you ever been terminated?"

What to do with chalk when deepwater soloing?

Overriding an object in memory with placement new

Why did the Falcon Heavy center core fall off the ASDS OCISLY barge?

Fundamental Solution of the Pell Equation

Why do people hide their license plates in the EU?

When a candle burns, why does the top of wick glow if bottom of flame is hottest?

What does the "x" in "x86" represent?

Is the Standard Deduction better than Itemized when both are the same amount?

Using audio cues to encourage good posture



Domain leads to Apache default page instead of the desired page



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Come Celebrate our 10 Year Anniversary!My virtualhost not working for non-www versionApache subdomain not working: uses real domainProblems with Vhost on Ubuntu 12.04 + Apache2VirtualHost's server name does not work (shows /var/www), all aliases doApache Virtualhost shows default page onlynginx as reverse ssl proxy (Apache + Varnish) skips its own configurationApache: Reverse proxy with directoriesApache always serving first virtual hostVirtual Host domain doesn't get me to right folderApache seems to be ignoring port 80 vhost





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I have set up a server, and created additional virtual hosts with their document roots being /var/www/example.com But whenever I got to example.com it leads to the default "its working" Apache page.



If I go to example.com/example.com/index.html however it displays the code that I would have liked to display by default.



Thank you for your help.



---- In Response To Carlos ----



Here is the code you asked for



        > apache2ctl -S  
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:80 is a NameVirtualHost
default server example.com (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost example.com (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost 2.example.com (/etc/apache2/sites-enabled/2.example.com.conf:1)
port 80 namevhost example.com (/etc/apache2/sites-enabled/example.com.conf:1)
alias www.example.com
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33









share|improve this question
















bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Do you enable the vhosts? a2ensite * can help you.

    – Carlos Mario Mora Restrepo
    Dec 24 '16 at 3:48











  • Yes the vhosts are enabled

    – Andrew
    Dec 24 '16 at 3:49











  • Can you share your apache configuration?

    – Craig Miskell
    Dec 24 '16 at 6:29











  • please show how to apache are parsing your vhost.

    – Carlos Mario Mora Restrepo
    Dec 24 '16 at 13:48











  • please show how to apache are parsing your vhost. apache2ctl -S (if you use ubuntu or any debian like)

    – Carlos Mario Mora Restrepo
    Dec 24 '16 at 13:49


















0















I have set up a server, and created additional virtual hosts with their document roots being /var/www/example.com But whenever I got to example.com it leads to the default "its working" Apache page.



If I go to example.com/example.com/index.html however it displays the code that I would have liked to display by default.



Thank you for your help.



---- In Response To Carlos ----



Here is the code you asked for



        > apache2ctl -S  
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:80 is a NameVirtualHost
default server example.com (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost example.com (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost 2.example.com (/etc/apache2/sites-enabled/2.example.com.conf:1)
port 80 namevhost example.com (/etc/apache2/sites-enabled/example.com.conf:1)
alias www.example.com
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33









share|improve this question
















bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Do you enable the vhosts? a2ensite * can help you.

    – Carlos Mario Mora Restrepo
    Dec 24 '16 at 3:48











  • Yes the vhosts are enabled

    – Andrew
    Dec 24 '16 at 3:49











  • Can you share your apache configuration?

    – Craig Miskell
    Dec 24 '16 at 6:29











  • please show how to apache are parsing your vhost.

    – Carlos Mario Mora Restrepo
    Dec 24 '16 at 13:48











  • please show how to apache are parsing your vhost. apache2ctl -S (if you use ubuntu or any debian like)

    – Carlos Mario Mora Restrepo
    Dec 24 '16 at 13:49














0












0








0








I have set up a server, and created additional virtual hosts with their document roots being /var/www/example.com But whenever I got to example.com it leads to the default "its working" Apache page.



If I go to example.com/example.com/index.html however it displays the code that I would have liked to display by default.



Thank you for your help.



---- In Response To Carlos ----



Here is the code you asked for



        > apache2ctl -S  
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:80 is a NameVirtualHost
default server example.com (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost example.com (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost 2.example.com (/etc/apache2/sites-enabled/2.example.com.conf:1)
port 80 namevhost example.com (/etc/apache2/sites-enabled/example.com.conf:1)
alias www.example.com
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33









share|improve this question
















I have set up a server, and created additional virtual hosts with their document roots being /var/www/example.com But whenever I got to example.com it leads to the default "its working" Apache page.



If I go to example.com/example.com/index.html however it displays the code that I would have liked to display by default.



Thank you for your help.



---- In Response To Carlos ----



Here is the code you asked for



        > apache2ctl -S  
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:80 is a NameVirtualHost
default server example.com (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost example.com (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost 2.example.com (/etc/apache2/sites-enabled/2.example.com.conf:1)
port 80 namevhost example.com (/etc/apache2/sites-enabled/example.com.conf:1)
alias www.example.com
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33






virtualhost apache2






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 3 '17 at 11:48









Jenny D

24.2k116196




24.2k116196










asked Dec 24 '16 at 3:45









AndrewAndrew

11




11





bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Do you enable the vhosts? a2ensite * can help you.

    – Carlos Mario Mora Restrepo
    Dec 24 '16 at 3:48











  • Yes the vhosts are enabled

    – Andrew
    Dec 24 '16 at 3:49











  • Can you share your apache configuration?

    – Craig Miskell
    Dec 24 '16 at 6:29











  • please show how to apache are parsing your vhost.

    – Carlos Mario Mora Restrepo
    Dec 24 '16 at 13:48











  • please show how to apache are parsing your vhost. apache2ctl -S (if you use ubuntu or any debian like)

    – Carlos Mario Mora Restrepo
    Dec 24 '16 at 13:49



















  • Do you enable the vhosts? a2ensite * can help you.

    – Carlos Mario Mora Restrepo
    Dec 24 '16 at 3:48











  • Yes the vhosts are enabled

    – Andrew
    Dec 24 '16 at 3:49











  • Can you share your apache configuration?

    – Craig Miskell
    Dec 24 '16 at 6:29











  • please show how to apache are parsing your vhost.

    – Carlos Mario Mora Restrepo
    Dec 24 '16 at 13:48











  • please show how to apache are parsing your vhost. apache2ctl -S (if you use ubuntu or any debian like)

    – Carlos Mario Mora Restrepo
    Dec 24 '16 at 13:49

















Do you enable the vhosts? a2ensite * can help you.

– Carlos Mario Mora Restrepo
Dec 24 '16 at 3:48





Do you enable the vhosts? a2ensite * can help you.

– Carlos Mario Mora Restrepo
Dec 24 '16 at 3:48













Yes the vhosts are enabled

– Andrew
Dec 24 '16 at 3:49





Yes the vhosts are enabled

– Andrew
Dec 24 '16 at 3:49













Can you share your apache configuration?

– Craig Miskell
Dec 24 '16 at 6:29





Can you share your apache configuration?

– Craig Miskell
Dec 24 '16 at 6:29













please show how to apache are parsing your vhost.

– Carlos Mario Mora Restrepo
Dec 24 '16 at 13:48





please show how to apache are parsing your vhost.

– Carlos Mario Mora Restrepo
Dec 24 '16 at 13:48













please show how to apache are parsing your vhost. apache2ctl -S (if you use ubuntu or any debian like)

– Carlos Mario Mora Restrepo
Dec 24 '16 at 13:49





please show how to apache are parsing your vhost. apache2ctl -S (if you use ubuntu or any debian like)

– Carlos Mario Mora Restrepo
Dec 24 '16 at 13:49










1 Answer
1






active

oldest

votes


















0














your are using example.com for the default vhost and the first vhost. That is the reason why you are displaying the default site, and not example.com site.



**:80 is a NameVirtualHost
default server example.com (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost example.com (/etc/apache2/sites-enabled/000-default.conf:1)*






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
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f822564%2fdomain-leads-to-apache-default-page-instead-of-the-desired-page%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














    your are using example.com for the default vhost and the first vhost. That is the reason why you are displaying the default site, and not example.com site.



    **:80 is a NameVirtualHost
    default server example.com (/etc/apache2/sites-enabled/000-default.conf:1)
    port 80 namevhost example.com (/etc/apache2/sites-enabled/000-default.conf:1)*






    share|improve this answer




























      0














      your are using example.com for the default vhost and the first vhost. That is the reason why you are displaying the default site, and not example.com site.



      **:80 is a NameVirtualHost
      default server example.com (/etc/apache2/sites-enabled/000-default.conf:1)
      port 80 namevhost example.com (/etc/apache2/sites-enabled/000-default.conf:1)*






      share|improve this answer


























        0












        0








        0







        your are using example.com for the default vhost and the first vhost. That is the reason why you are displaying the default site, and not example.com site.



        **:80 is a NameVirtualHost
        default server example.com (/etc/apache2/sites-enabled/000-default.conf:1)
        port 80 namevhost example.com (/etc/apache2/sites-enabled/000-default.conf:1)*






        share|improve this answer













        your are using example.com for the default vhost and the first vhost. That is the reason why you are displaying the default site, and not example.com site.



        **:80 is a NameVirtualHost
        default server example.com (/etc/apache2/sites-enabled/000-default.conf:1)
        port 80 namevhost example.com (/etc/apache2/sites-enabled/000-default.conf:1)*







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 26 '16 at 12:56









        Carlos Mario Mora RestrepoCarlos Mario Mora Restrepo

        1446




        1446






























            draft saved

            draft discarded




















































            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%2f822564%2fdomain-leads-to-apache-default-page-instead-of-the-desired-page%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

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

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

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