Apache2 virtual host throwing this site cant be reached












0














hi i am just a beginner to virtual host configuration in apache2 and followed tutorials about configuring virtual hosts but when i open the url it says this site cant me reached.
my config file in available sites is



<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName anet2.ogmait.com
<Directory /var/www/html/>
AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

<FilesMatch ".(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>


also i have run



  sudo a2ensite anet2.conf


which returns the site is enabled.Please guide me if i am doing wrong somewhere.Would be a great favor.
Thankyou










share|improve this question
























  • What is a2ensite? Is that how they start httpd on ubuntu or something? Is apache even running? What OS are you using? Is there anything thing in the log files? What does ps -ef | grep httpd show? Why does your config have ` <IfModule mod_ssl.c>` on the first line?
    – Red Cricket
    Nov 11 at 6:36












  • yes apache is running. a2ensite is apache2 enable site to make available sites , enabled. I am using Ubuntu.I have check log files but nothing is showing.
    – Pro Grammer
    Nov 11 at 6:37










  • ps -ef | grep httpd shows this root 6229 6215 0 06:38 pts/2 00:00:00 grep --color=auto httpd and <IfModule mod_ssl.c> came with the default generated config
    – Pro Grammer
    Nov 11 at 6:39












  • If httpd is running then maybe your system has a firewall set up. What does sudo iptables -L output?
    – Red Cricket
    Nov 11 at 6:42










  • sudo iptables -L outputs Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
    – Pro Grammer
    Nov 11 at 7:12
















0














hi i am just a beginner to virtual host configuration in apache2 and followed tutorials about configuring virtual hosts but when i open the url it says this site cant me reached.
my config file in available sites is



<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName anet2.ogmait.com
<Directory /var/www/html/>
AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

<FilesMatch ".(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>


also i have run



  sudo a2ensite anet2.conf


which returns the site is enabled.Please guide me if i am doing wrong somewhere.Would be a great favor.
Thankyou










share|improve this question
























  • What is a2ensite? Is that how they start httpd on ubuntu or something? Is apache even running? What OS are you using? Is there anything thing in the log files? What does ps -ef | grep httpd show? Why does your config have ` <IfModule mod_ssl.c>` on the first line?
    – Red Cricket
    Nov 11 at 6:36












  • yes apache is running. a2ensite is apache2 enable site to make available sites , enabled. I am using Ubuntu.I have check log files but nothing is showing.
    – Pro Grammer
    Nov 11 at 6:37










  • ps -ef | grep httpd shows this root 6229 6215 0 06:38 pts/2 00:00:00 grep --color=auto httpd and <IfModule mod_ssl.c> came with the default generated config
    – Pro Grammer
    Nov 11 at 6:39












  • If httpd is running then maybe your system has a firewall set up. What does sudo iptables -L output?
    – Red Cricket
    Nov 11 at 6:42










  • sudo iptables -L outputs Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
    – Pro Grammer
    Nov 11 at 7:12














0












0








0







hi i am just a beginner to virtual host configuration in apache2 and followed tutorials about configuring virtual hosts but when i open the url it says this site cant me reached.
my config file in available sites is



<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName anet2.ogmait.com
<Directory /var/www/html/>
AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

<FilesMatch ".(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>


also i have run



  sudo a2ensite anet2.conf


which returns the site is enabled.Please guide me if i am doing wrong somewhere.Would be a great favor.
Thankyou










share|improve this question















hi i am just a beginner to virtual host configuration in apache2 and followed tutorials about configuring virtual hosts but when i open the url it says this site cant me reached.
my config file in available sites is



<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName anet2.ogmait.com
<Directory /var/www/html/>
AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

<FilesMatch ".(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>


also i have run



  sudo a2ensite anet2.conf


which returns the site is enabled.Please guide me if i am doing wrong somewhere.Would be a great favor.
Thankyou







apache virtualhost lamp






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 at 5:54









digijay

471414




471414










asked Nov 11 at 6:30









Pro Grammer

76




76












  • What is a2ensite? Is that how they start httpd on ubuntu or something? Is apache even running? What OS are you using? Is there anything thing in the log files? What does ps -ef | grep httpd show? Why does your config have ` <IfModule mod_ssl.c>` on the first line?
    – Red Cricket
    Nov 11 at 6:36












  • yes apache is running. a2ensite is apache2 enable site to make available sites , enabled. I am using Ubuntu.I have check log files but nothing is showing.
    – Pro Grammer
    Nov 11 at 6:37










  • ps -ef | grep httpd shows this root 6229 6215 0 06:38 pts/2 00:00:00 grep --color=auto httpd and <IfModule mod_ssl.c> came with the default generated config
    – Pro Grammer
    Nov 11 at 6:39












  • If httpd is running then maybe your system has a firewall set up. What does sudo iptables -L output?
    – Red Cricket
    Nov 11 at 6:42










  • sudo iptables -L outputs Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
    – Pro Grammer
    Nov 11 at 7:12


















  • What is a2ensite? Is that how they start httpd on ubuntu or something? Is apache even running? What OS are you using? Is there anything thing in the log files? What does ps -ef | grep httpd show? Why does your config have ` <IfModule mod_ssl.c>` on the first line?
    – Red Cricket
    Nov 11 at 6:36












  • yes apache is running. a2ensite is apache2 enable site to make available sites , enabled. I am using Ubuntu.I have check log files but nothing is showing.
    – Pro Grammer
    Nov 11 at 6:37










  • ps -ef | grep httpd shows this root 6229 6215 0 06:38 pts/2 00:00:00 grep --color=auto httpd and <IfModule mod_ssl.c> came with the default generated config
    – Pro Grammer
    Nov 11 at 6:39












  • If httpd is running then maybe your system has a firewall set up. What does sudo iptables -L output?
    – Red Cricket
    Nov 11 at 6:42










  • sudo iptables -L outputs Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
    – Pro Grammer
    Nov 11 at 7:12
















What is a2ensite? Is that how they start httpd on ubuntu or something? Is apache even running? What OS are you using? Is there anything thing in the log files? What does ps -ef | grep httpd show? Why does your config have ` <IfModule mod_ssl.c>` on the first line?
– Red Cricket
Nov 11 at 6:36






What is a2ensite? Is that how they start httpd on ubuntu or something? Is apache even running? What OS are you using? Is there anything thing in the log files? What does ps -ef | grep httpd show? Why does your config have ` <IfModule mod_ssl.c>` on the first line?
– Red Cricket
Nov 11 at 6:36














yes apache is running. a2ensite is apache2 enable site to make available sites , enabled. I am using Ubuntu.I have check log files but nothing is showing.
– Pro Grammer
Nov 11 at 6:37




yes apache is running. a2ensite is apache2 enable site to make available sites , enabled. I am using Ubuntu.I have check log files but nothing is showing.
– Pro Grammer
Nov 11 at 6:37












ps -ef | grep httpd shows this root 6229 6215 0 06:38 pts/2 00:00:00 grep --color=auto httpd and <IfModule mod_ssl.c> came with the default generated config
– Pro Grammer
Nov 11 at 6:39






ps -ef | grep httpd shows this root 6229 6215 0 06:38 pts/2 00:00:00 grep --color=auto httpd and <IfModule mod_ssl.c> came with the default generated config
– Pro Grammer
Nov 11 at 6:39














If httpd is running then maybe your system has a firewall set up. What does sudo iptables -L output?
– Red Cricket
Nov 11 at 6:42




If httpd is running then maybe your system has a firewall set up. What does sudo iptables -L output?
– Red Cricket
Nov 11 at 6:42












sudo iptables -L outputs Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
– Pro Grammer
Nov 11 at 7:12




sudo iptables -L outputs Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
– Pro Grammer
Nov 11 at 7:12

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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%2fstackoverflow.com%2fquestions%2f53246404%2fapache2-virtual-host-throwing-this-site-cant-be-reached%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • 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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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%2fstackoverflow.com%2fquestions%2f53246404%2fapache2-virtual-host-throwing-this-site-cant-be-reached%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







這個網誌中的熱門文章

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud

Zucchini