Not able to use vhost for myapp

All latest versions. php scl from @stephdl.

Hi,

as per title, I am not able to use a vhost for a webapplication “myapp”.

I’ve created a vhost test.mydomain.com and put a index.html in /var/lib/nethserver/vhost/test/index.html

When browsing to https://test.mydomain.com, I always get the main welcome web page of nethserver, and not my index.html

Any hints appreciated!

TIA

ps. I’ve read this too How to use virtual host?

Could you post your configuration of vhost?
Are you using Reverse Proxy or the server is directly recheable on port 80 and 443?

Try also to launch command systemctl restart httpd and check if it returns error or if something changes.

Regards.

Thanks @federico.ballarini

test=vhost
Access=public
Description=test
ForceSslStatus=enabled
FtpStatus=disabled
Indexes=enabled
PasswordStatus=disabled
PhpAllowUrlfOpen=enabled
PhpMaxExecTime=disabled
PhpMaxFileUploads=disabled
PhpMemoryLimit=0
PhpPostMaxSize=0
PhpUpMaxFileSize=0
PhpVersion=default
ServerNames=test.mydomain.com
SslCertificate=
status=enabled

systemctl restart httpd does not change anything

Try clear browser cache or use another browser.
And check that index.html is not NethServer index :smile:

DNS of your PC resolve correctly the address?

All done and checked… Still not working :frowning:

Wait for some tests. I will update you ASAP.

1 Like

Maybe a permission problem of the index.html file? Owner still root?

2 Likes

Does test.domain.com is the FQDN of the server?

1 Like

Yes it is.

Now I wonder, for this is a hosted machine, did the public DNS play tricks on me due to propagation? For I can reach the vhost via http now…

it is ftp:apache

I did some test on this server. I’ve created www2 virtualhost and it works fine setting right permission.
Check DNS and now it’s all ok. I think the problem is solved.

2 Likes

Thanks very much. Appreciate your time and effort!

Ciao!

1 Like

When you use the fqdn of the server, the /var/www/html is used. I suppose it is due to apache configuration order that you can verify by httpd -S

Thanks. The FQDN is srv01.domain.com. The vhost FQDN is test.domain.com

It could well be I need to go back to school and study FQDN :wink:

1 Like