LayLow
(LayLow)
February 16, 2019, 9:38am
1
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.
LayLow
(LayLow)
February 16, 2019, 10:38am
3
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
DNS of your PC resolve correctly the address?
LayLow
(LayLow)
February 16, 2019, 10:46am
5
All done and checked… Still not working
Wait for some tests. I will update you ASAP.
1 Like
mrmarkuz
(Markus Neuberger)
February 16, 2019, 11:22am
7
Maybe a permission problem of the index.html file? Owner still root?
2 Likes
stephdl
(Stéphane de Labrusse)
February 16, 2019, 11:25am
8
Does test.domain.com is the FQDN of the server?
1 Like
LayLow
(LayLow)
February 16, 2019, 11:38am
9
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…
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
LayLow
(LayLow)
February 16, 2019, 12:32pm
12
Thanks very much. Appreciate your time and effort!
Ciao!
1 Like
stephdl
(Stéphane de Labrusse)
February 16, 2019, 3:17pm
13
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
LayLow
(LayLow)
February 16, 2019, 4:40pm
14
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
1 Like