Mailing List Archive

firefox shows default site page
Hello,

I have this hostname: mail.openmbox.net
when access it as http, it will be rewrited to https (rewrite and certs setup by certbot automatically).

this works fine in chrome browser.

but when I access http://mail.openmbox.net in firefox, it will show the default site.

That's to say,

http://mail.openmbox.net/ works correctly on chrome (show the correct site and rewrite to https).
but it shows the default site (ubuntu default html) on firefox as you can test it as well.

I am totally confused. can you help?

Thanks.

Additional info:

The version:
# apache2 -v
Server version: Apache/2.4.41 (Ubuntu)
Server built: 2022-06-14T13:30:55

The config:
<VirtualHost *:80>

ServerAdmin webmaster@localhost
ServerName mail.openmbox.net
DocumentRoot /var/www/snappy


ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory />
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order deny,allow
Allow from all
Require all granted
</Directory>

<Directory /var/www/snappy/data>
Require all denied
</Directory>

RewriteEngine on
RewriteCond %{SERVER_NAME} =mail.openmbox.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: firefox shows default site page [ In reply to ]
> I have this hostname: mail.openmbox.net
> when access it as http, it will be rewrited to https (rewrite and certs setup by certbot automatically).
>
> this works fine in chrome browser.
>
> but when I access http://mail.openmbox.net in firefox, it will show the default site.

For what it’s worth, I get the “default site” on http://mail.openmbox.net in all browsers I tried (Safari, Firefox, Chrome). The https version looks right.

Sorry I have no solution for your problem, just adding some info.

If you’re in an urgent situation, as a workaround, you could put a .htaccess or index.php in the default web root and have that redirect to https://mail.openmbox.net/

Good luck,

Kind regards,
Walter Hop


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: firefox shows default site page [ In reply to ]
Allow me to step aside from your question for a moment, I believe if
you don't get the basics right you should just stop, this is very
important:

Directory directive specifies a directory in your filesystem, ***do
not ever allow anything in /***, even less the execution of cgi
scripts.

You are also mixing authz 2.2 directives with 2.4 directives.

And also allowing .htaccess files to be used throughout your whole
operative system.

Briefly it is a compendium of ill advice.

In your server config context you should define at least these:

<Directory />
Options None
AllowOverride none
Require all denied
</Directory>

and inside your virtualhost:

DocumentRoot /var/www/snappy
<Directory /var/www/snappy>
#Options "add whatever options you do need, do not add random options .."
Require all granted
</Directory>

and then configure other directories or whatever you need for service.
But these above are the basics.

About including AllowOverride directive, only do if you want non-admin
users to setup specific directories configuration, set it up where it
is really needed (NOT EVER system wide), most times using .htaccess
will just complicate your life otherwise.

El vie, 11 nov 2022 a las 10:08, <support@openmbox.net> escribió:
>
> Hello,
>
> I have this hostname: mail.openmbox.net
> when access it as http, it will be rewrited to https (rewrite and certs setup by certbot automatically).
>
> this works fine in chrome browser.
>
> but when I access http://mail.openmbox.net in firefox, it will show the default site.
>
> That's to say,
>
> http://mail.openmbox.net/ works correctly on chrome (show the correct site and rewrite to https).
> but it shows the default site (ubuntu default html) on firefox as you can test it as well.
>
> I am totally confused. can you help?
>
> Thanks.
>
> Additional info:
>
> The version:
> # apache2 -v
> Server version: Apache/2.4.41 (Ubuntu)
> Server built: 2022-06-14T13:30:55
>
> The config:
> <VirtualHost *:80>
>
> ServerAdmin webmaster@localhost
> ServerName mail.openmbox.net
> DocumentRoot /var/www/snappy
>
>
> ErrorLog ${APACHE_LOG_DIR}/error.log
> CustomLog ${APACHE_LOG_DIR}/access.log combined
>
> <Directory />
> Options +Indexes +FollowSymLinks +ExecCGI
> AllowOverride All
> Order deny,allow
> Allow from all
> Require all granted
> </Directory>
>
> <Directory /var/www/snappy/data>
> Require all denied
> </Directory>
>
> RewriteEngine on
> RewriteCond %{SERVER_NAME} =mail.openmbox.net
> RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
> </VirtualHost>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


--
Daniel Ferradal
HTTPD Project
#httpd help at Libera.Chat

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: firefox shows default site page [ In reply to ]
Delete all that Rewrite voodoo and just redirect.

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

Redirect permanent / https://example.com/
</VirtualHost>


IMPORTANT NOTE:
Also you are configuring all that access to your SYSTEM root directory.
<Directory /> is the whole filesystem path there, not an url path.

Don’t do that. Restrict all and allow what you need for your content, don’t expose your whole system.


> On Nov 11, 2022, at 18:07, support@openmbox.net wrote:
>
> Hello,
>
> I have this hostname: mail.openmbox.net
> when access it as http, it will be rewrited to https (rewrite and certs setup by certbot automatically).
>
> this works fine in chrome browser.
>
> but when I access http://mail.openmbox.net in firefox, it will show the default site.
>
> That's to say,
>
> http://mail.openmbox.net/ works correctly on chrome (show the correct site and rewrite to https).
> but it shows the default site (ubuntu default html) on firefox as you can test it as well.
>
> I am totally confused. can you help?
>
> Thanks.
>
> Additional info:
>
> The version:
> # apache2 -v
> Server version: Apache/2.4.41 (Ubuntu)
> Server built: 2022-06-14T13:30:55
>
> The config:
> <VirtualHost *:80>
>
> ServerAdmin webmaster@localhost
> ServerName mail.openmbox.net
> DocumentRoot /var/www/snappy
>
>
> ErrorLog ${APACHE_LOG_DIR}/error.log
> CustomLog ${APACHE_LOG_DIR}/access.log combined
>
> <Directory />
> Options +Indexes +FollowSymLinks +ExecCGI
> AllowOverride All
> Order deny,allow
> Allow from all
> Require all granted
> </Directory>
>
> <Directory /var/www/snappy/data>
> Require all denied
> </Directory>
>
> RewriteEngine on
> RewriteCond %{SERVER_NAME} =mail.openmbox.net
> RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
> </VirtualHost>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: firefox shows default site page [ In reply to ]
Thanks Daniel for pointting out these.

While i changed the config to follows:

<VirtualHost *:80>

ServerAdmin webmaster@localhost
ServerName mail.openmbox.net
DocumentRoot /var/www/snappy


ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory />
Options None
AllowOverride None
Require all denied
</Directory>

<Directory /var/www/snappy>
Options +Indexes
Order deny,allow
Allow from all
Require all granted
</Directory>


<Directory /var/www/snappy/data>
Require all denied
</Directory>

RewriteEngine on
RewriteCond %{SERVER_NAME} =mail.openmbox.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>



And I restarted apache2 without error.
But http://mail.openmbox.net still points to the default site.

Can you help further?

Regards.
Henry




November 11, 2022 at 6:01 PM, "Daniel Ferradal" <dferradal@apache.org> wrote:


>
> Allow me to step aside from your question for a moment, I believe if
> you don't get the basics right you should just stop, this is very
> important:
>
> Directory directive specifies a directory in your filesystem, ***do
> not ever allow anything in /***, even less the execution of cgi
> scripts.
>
> You are also mixing authz 2.2 directives with 2.4 directives.
>
> And also allowing .htaccess files to be used throughout your whole
> operative system.
>
> Briefly it is a compendium of ill advice.
>
> In your server config context you should define at least these:
>
> <Directory />
> Options None
> AllowOverride none
> Require all denied
> </Directory>
>
> and inside your virtualhost:
>
> DocumentRoot /var/www/snappy
> <Directory /var/www/snappy>
> #Options "add whatever options you do need, do not add random options .."
> Require all granted
> </Directory>
>
> and then configure other directories or whatever you need for service.
> But these above are the basics.
>
> About including AllowOverride directive, only do if you want non-admin
> users to setup specific directories configuration, set it up where it
> is really needed (NOT EVER system wide), most times using .htaccess
> will just complicate your life otherwise.
>
> El vie, 11 nov 2022 a las 10:08, <support@openmbox.net> escribió:
>
> >
> > Hello,
> >
> > I have this hostname: mail.openmbox.net
> > when access it as http, it will be rewrited to https (rewrite and certs setup by certbot automatically).
> >
> > this works fine in chrome browser.
> >
> > but when I access http://mail.openmbox.net/ in firefox, it will show the default site.
> >
> > That's to say,
> >
> > http://mail.openmbox.net/ works correctly on chrome (show the correct site and rewrite to https).
> > but it shows the default site (ubuntu default html) on firefox as you can test it as well.
> >
> > I am totally confused. can you help?
> >
> > Thanks.
> >
> > Additional info:
> >
> > The version:
> > # apache2 -v
> > Server version: Apache/2.4.41 (Ubuntu)
> > Server built: 2022-06-14T13:30:55
> >
> > The config:
> > <VirtualHost *:80>
> >
> > ServerAdmin webmaster@localhost
> > ServerName mail.openmbox.net
> > DocumentRoot /var/www/snappy
> >
> > ErrorLog ${APACHE_LOG_DIR}/error.log
> > CustomLog ${APACHE_LOG_DIR}/access.log combined
> >
> > <Directory />
> > Options +Indexes +FollowSymLinks +ExecCGI
> > AllowOverride All
> > Order deny,allow
> > Allow from all
> > Require all granted
> > </Directory>
> >
> > <Directory /var/www/snappy/data>
> > Require all denied
> > </Directory>
> >
> > RewriteEngine on
> > RewriteCond %{SERVER_NAME} =mail.openmbox.net
> > RewriteRule ^ https://% https://%25/ {SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
> > </VirtualHost>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
> --
> Daniel Ferradal
> HTTPD Project
> #httpd help at Libera.Chat
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: firefox shows default site page [ In reply to ]
SpiceMan,

I follow your suggestions to set up as follows.

webmail.conf:

<VirtualHost *:80>

ServerAdmin webmaster@localhost
ServerName mail.openmbox.net


ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

RewriteEngine on
RewriteCond %{SERVER_NAME} =mail.openmbox.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>


webmail-le-ssl.conf:

<IfModule mod_ssl.c>
<VirtualHost *:443>

ServerAdmin webmaster@localhost
ServerName mail.openmbox.net
DocumentRoot /var/www/snappy

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory />
Options None
AllowOverride None
Require all denied
</Directory>

<Directory /var/www/snappy>
Options +Indexes
Order deny,allow
Allow from all
Require all granted
</Directory>

<Directory /var/www/snappy/data>
Require all denied
</Directory>

SSLCertificateFile /etc/letsencrypt/live/mail.openmbox.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mail.openmbox.net/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>


And apache2 restarted without error.

but http://mail.openmbox.net still go to default site.

any idea?

regards.




November 11, 2022 at 6:03 PM, "SpiceMan" <spiceman@gmail.com> wrote:


>
> Delete all that Rewrite voodoo and just redirect.
>
> <VirtualHost *:80>
> ServerName example.com
> ServerAlias www.example.com
>
> Redirect permanent / https://example.com/
> </VirtualHost>
>
> IMPORTANT NOTE:
> Also you are configuring all that access to your SYSTEM root directory.
> <Directory /> is the whole filesystem path there, not an url path.
>
> Don’t do that. Restrict all and allow what you need for your content, don’t expose your whole system.
>
> >
> > On Nov 11, 2022, at 18:07, support@openmbox.net wrote:
> >
> > Hello,
> >
> > I have this hostname: mail.openmbox.net
> > when access it as http, it will be rewrited to https (rewrite and certs setup by certbot automatically).
> >
> > this works fine in chrome browser.
> >
> > but when I access http://mail.openmbox.net/ in firefox, it will show the default site.
> >
> > That's to say,
> >
> > http://mail.openmbox.net/ works correctly on chrome (show the correct site and rewrite to https).
> > but it shows the default site (ubuntu default html) on firefox as you can test it as well.
> >
> > I am totally confused. can you help?
> >
> > Thanks.
> >
> > Additional info:
> >
> > The version:
> > # apache2 -v
> > Server version: Apache/2.4.41 (Ubuntu)
> > Server built: 2022-06-14T13:30:55
> >
> > The config:
> > <VirtualHost *:80>
> >
> > ServerAdmin webmaster@localhost
> > ServerName mail.openmbox.net
> > DocumentRoot /var/www/snappy
> >
> >
> > ErrorLog ${APACHE_LOG_DIR}/error.log
> > CustomLog ${APACHE_LOG_DIR}/access.log combined
> >
> > <Directory />
> > Options +Indexes +FollowSymLinks +ExecCGI
> > AllowOverride All
> > Order deny,allow
> > Allow from all
> > Require all granted
> > </Directory>
> >
> > <Directory /var/www/snappy/data>
> > Require all denied
> > </Directory>
> >
> > RewriteEngine on
> > RewriteCond %{SERVER_NAME} =mail.openmbox.net
> > RewriteRule ^ https://% https://%25/ {SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
> > </VirtualHost>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: firefox shows default site page [ In reply to ]
On 11/11/2022 12:05, support@openmbox.net wrote:
>
>
> And apache2 restarted without error.
>
> but http://mail.openmbox.net still go to default site.
>
> any idea?
>
> regards.
>
>

Can I just ask a simple but obvious question. Have you enabled the site?
A simple command such as "sudo a2ensite openmbox.conf". I am assuming
openmbox.conf file is created. I always create separate conf files for
each site/domain to make things simple but some people have different
vies about this. You can enable all sites with "*.conf" parameter to
make it even more simpler.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Re: firefox shows default site page [ In reply to ]
Hello

I just created config files under /etc/apache2/sites-enabled directly.

$ ls /etc/apache2/sites-enabled
lrwxrwxrwx 1 root root 35 Oct 20 14:42 000-default.conf -> ../sites-available/000-default.conf
-rw-r--r-- 1 root root 1850 Nov 11 03:58 webmail-le-ssl.conf
-rw-r--r-- 1 root root 1469 Nov 11 03:59 webmail.conf

so no a2ensite command is needed.
Thanks


November 11, 2022 at 8:55 PM, "???? Good Guy ????" <xfsgpr@hotmail.com> wrote:


>
> On 11/11/2022 12:05, support@openmbox.net wrote:
>
> >
> > And apache2 restarted without error.
> >
> > but http://mail.openmbox.net/ still go to default site.
> >
> > any idea?
> >
> > regards.
> >
>
> Can I just ask a simple but obvious question. Have you enabled the site? A simple command such as "sudo a2ensite openmbox.conf". I am assuming openmbox.conf file is created. I always create separate conf files for each site/domain to make things simple but some people have different vies about this. You can enable all sites with "*.conf" parameter to make it even more simpler.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: firefox shows default site page [ In reply to ]
Can you show us the output of the apachectl -S command ?

> On Nov 11, 2022, at 22:05, support@openmbox.net wrote:
>
> Hello
>
> I just created config files under /etc/apache2/sites-enabled directly.
>
> $ ls /etc/apache2/sites-enabled
> lrwxrwxrwx 1 root root 35 Oct 20 14:42 000-default.conf -> ../sites-available/000-default.conf
> -rw-r--r-- 1 root root 1850 Nov 11 03:58 webmail-le-ssl.conf
> -rw-r--r-- 1 root root 1469 Nov 11 03:59 webmail.conf
>
> so no a2ensite command is needed.
> Thanks
>
>
> November 11, 2022 at 8:55 PM, "???? Good Guy ????" <xfsgpr@hotmail.com> wrote:
>
>
>>
>> On 11/11/2022 12:05, support@openmbox.net wrote:
>>
>>>
>>> And apache2 restarted without error.
>>>
>>> but http://mail.openmbox.net/ still go to default site.
>>>
>>> any idea?
>>>
>>> regards.
>>>
>>
>> Can I just ask a simple but obvious question. Have you enabled the site? A simple command such as "sudo a2ensite openmbox.conf". I am assuming openmbox.conf file is created. I always create separate conf files for each site/domain to make things simple but some people have different vies about this. You can enable all sites with "*.conf" parameter to make it even more simpler.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: firefox shows default site page [ In reply to ]
> but it shows the default site (ubuntu default html) on firefox as you can test it as well.
>
> I am totally confused. can you help?

I suggest turning on `loglevel trace8` and noting the time of your
test request with firefox.

Is a request traced? Does the Host: header or anything else traced
look unexpected?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: firefox shows default site page [ In reply to ]
sure, here are the content.

root@mail:/etc/apache2/sites-enabled# cat 000-default.conf |grep -v '#'
<VirtualHost *:80>

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html


ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>



root@mail:/etc/apache2/sites-enabled# apachectl -S
VirtualHost configuration:
*:443 is a NameVirtualHost
default server openmbox.net (/etc/apache2/sites-enabled/homepage-le-ssl.conf:2)
port 443 namevhost openmbox.net (/etc/apache2/sites-enabled/homepage-le-ssl.conf:2)
port 443 namevhost mail.openmbox.net (/etc/apache2/sites-enabled/webmail-le-ssl.conf:2)
*:80 is a NameVirtualHost
default server mail.openmbox.net (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost mail.openmbox.net (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost openmbox.net (/etc/apache2/sites-enabled/homepage.conf:1)
port 80 namevhost mail.openmbox.net (/etc/apache2/sites-enabled/webmail.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: ENABLE_USR_LIB_CGI_BIN
User: name="www-data" id=33
Group: name="www-data" id=33



As you see, these two lines of output are quite strange:
default server mail.openmbox.net (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost mail.openmbox.net (/etc/apache2/sites-enabled/000-default.conf:1)


so how to?

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: firefox shows default site page [ In reply to ]
> As you see, these two lines of output are quite strange:
> default server mail.openmbox.net (/etc/apache2/sites-enabled/000-default.conf:1)
> port 80 namevhost mail.openmbox.net (/etc/apache2/sites-enabled/000-default.conf:1)

this is normal

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Re: firefox shows default site page [ In reply to ]
Hi,

Just a thought, but can you show the output from: apache2ctl -S

Ed

On Fri, 11 Nov 2022 at 13:06, <support@openmbox.net> wrote:

> Hello
>
> I just created config files under /etc/apache2/sites-enabled directly.
>
> $ ls /etc/apache2/sites-enabled
> lrwxrwxrwx 1 root root 35 Oct 20 14:42 000-default.conf ->
> ../sites-available/000-default.conf
> -rw-r--r-- 1 root root 1850 Nov 11 03:58 webmail-le-ssl.conf
> -rw-r--r-- 1 root root 1469 Nov 11 03:59 webmail.conf
>
> so no a2ensite command is needed.
> Thanks
>
>
> November 11, 2022 at 8:55 PM, "???? Good Guy ????" <xfsgpr@hotmail.com> wrote:
>
>
> >
> > On 11/11/2022 12:05, support@openmbox.net wrote:
> >
> > >
> > > And apache2 restarted without error.
> > >
> > > but http://mail.openmbox.net/ still go to default site.
> > >
> > > any idea?
> > >
> > > regards.
> > >
> >
> > Can I just ask a simple but obvious question. Have you enabled the site?
> A simple command such as "sudo a2ensite openmbox.conf". I am assuming
> openmbox.conf file is created. I always create separate conf files for each
> site/domain to make things simple but some people have different vies about
> this. You can enable all sites with "*.conf" parameter to make it even more
> simpler.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: firefox shows default site page [ In reply to ]
Hello

# rm -f 000-default.conf
# service apache2 restart

After I removed 000-default.conf the site http://mail.openmbox.net just works.
so the reason is due to 000-default.conf? we should remove this file in a regular webserver?

Thanks.


November 11, 2022 at 9:19 PM, "Eric Covener" <covener@gmail.com> wrote:


>
> >
> > As you see, these two lines of output are quite strange:
> > default server mail.openmbox.net (/etc/apache2/sites-enabled/000-default.conf:1)
> > port 80 namevhost mail.openmbox.net (/etc/apache2/sites-enabled/000-default.conf:1)
> >
>
> this is normal
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: firefox shows default site page [ In reply to ]
On Fri, Nov 11, 2022 at 8:27 AM <support@openmbox.net> wrote:
>
> Hello
>
> # rm -f 000-default.conf
> # service apache2 restart
>
> After I removed 000-default.conf the site http://mail.openmbox.net just works.
> so the reason is due to 000-default.conf? we should remove this file in a regular webserver?

If the systems hostname matches one of your other port 80 vhosts, you
should set a ServerName in it and not it let implicitly use the system
hostname.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: firefox shows default site page [ In reply to ]
Thanks. So I know that it's due to 000-default.conf was using the system hostname as its default virtual server.

And my system hostname is just same as web domain name.

# hostname
mail.openmbox.net


After I removed 000-default.conf the site does work.
Thanks a lot.


November 11, 2022 at 9:27 PM, "Eric Covener" <covener@gmail.com> wrote:


>
> On Fri, Nov 11, 2022 at 8:27 AM <support@openmbox.net> wrote:
>
> >
> > Hello
> >
> > # rm -f 000-default.conf
> > # service apache2 restart
> >
> > After I removed 000-default.conf the site http://mail.openmbox.net/ just works.
> > so the reason is due to 000-default.conf? we should remove this file in a regular webserver?
> >
>
> If the systems hostname matches one of your other port 80 vhosts, you
> should set a ServerName in it and not it let implicitly use the system
> hostname.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org