Hi everybody,
I tried to install virtualmin on Centos 7.3 minimal.
After some try and errors I installed it fortunately correctly as I think.
But when I create a virtual server and upload a file index.html via a) its own ftp user or b) login with its own user into virualmin:10000 acount and use its uploading file service, I could not see anything more than this on the website.
Index of /
Name Last modified Size Description
I checked the permissions
home > my_username > public_html > index.html
home root : root 0755
my_username my_username : my_username 0750
public_html my_username : my_username 0750
index.html my_username : my_username 0644
This is so confusing! and I am sure about what I did in installation (history is inserted below).
I Re-checked the Configuration: response is
.. your system is ready for use by Virtualmin.
Also in
webmin > Servers > Apache Webserver I see this
Virtual Server Ip 80 my_domain.net /home/my_username/public_html Open
I did this in terminal : suexec -V
response is
====
-D AP_DOC_ROOT="/home"
-D AP_GID_MIN=100
-D AP_HTTPD_USER="apache"
-D AP_LOG_SYSLOG
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_UID_MIN=500
-D AP_USERDIR_SUFFIX="public_html"
====
I appreciate any help or suggestions
Kind Regards
++++++++++++++++++++++++ History of all I did until now: ++++++++++++++++++++++++
1- Since the server is VPS I followed this :
https://www.virtualmin.com/documentation/dns/faq
nano /etc/resolv.conf
delete all IPs and copy this:
nameserver 127.0.0.1
then in terminal
chattr +i /etc/resolv.conf
2- Also in virtualmin in section "Addresses and networking" I changed the IP to the correct one introduced from the server provider.
3- nano /etc/selinux/config
SELINUX=disabled it was disabled
and
setenforce 0
4- I installed the CSF like this method
https://www.vultr.com/docs/setup-csf-on-centos-7
I am sure the iptables makes the port 80 open
Also I did this command
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
5- According to https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-cent...
I set a swap file for the system
sudo fallocate -l 4G /swapfile
ls -lh /swapfile
-rw-r--r-- 1 root root 4.0G Oct 30 11:00 /swapfile
and then mouned it via webmin > disk and file systems ..
5- since the fresh virtualmin has a problem with Proftp I did this:
/ webmin / webmin configuration / webmin module / Delete / select ProFTPD Server
check Ignore module dependencies when deleting
Delete Proftp
/ System / Bootup and Shutdown / select proftpd
Disable Now and On Boot
Reboot System
In terminal
yum erase proftpd
yum -y install proftpd
service proftpd start
check connection
telnet ip 21 and it responsed well
/ webmin / webmin configuration / webmin module / Install / Standard module from www.webmin.com
Select Proftpd
check Ignore Dependencies
check Grant access to all Webmin users
Install module
/ System / Bootup and Shutdown / select proftpd
Start Now and Boot
This is my first experience with virtualmin
Regarding
https://www.virtualmin.com/documentation/web/troubleshooting
I could solve my problem in this way I will explain, but I am confused about the reason.
In the installation I remember I did this
nano /etc/hosts
I saw an IP ( I name that "IP0" ) which was not introduced by the server provider and hence I deleted it and then put the correct IP.
IP server.my_main_domain.com server
I saved it.
After I could install virtualmin and then Recheck Configuration suggested me this alarm :
"Default IP address is set to "IP0", but the detected external address is actually "IP". This is typically the result of being behind a NAT firewall, and should be corrected on the module configuration page."
I wondered!
So in section "Addresses and networking" I saw the IP0 (that one I deleted in file /etc/hosts) and I changed it to the corrected IP introduced from the server provider.
It was not so strange for me since I reached out the virtualmin UI via IP:10000 and not IP0:10000
But this is the exact source of problem! and I faced the problem in this topic!
After I read this :
https://www.virtualmin.com/documentation/web/troubleshooting
first of all I did this:
/sbin/ifconfig
surprising!
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
again "IP0" ! different to what I expected! this "IP0" was not introduced by the server provider and they introduced "IP"!
So I changed IP to IP0 in section "Addresses and networking" again ! but I did not changed what I put in the /etc/hosts. ( in domain panel also points to IP and not IP0 )
Website is Okay but I am confused!
now I reached the virtualmin via IP:10000 and the dns records of all virtual servers I created are IP0.
Although the domain in its panel points to the "IP" and in virtualmin dns records pointed to "IP0" which is the ip of the interface eth0 (network) ! but everything is working well and I am highly confused!
And the alarm in the Recheck Configuration appears again and I no longer pay attention to it more.
"Default ip address is set to IP0, but the detected external address is actually IP. This is typically the result of being behind a NAT firewall, ... "
I will appreciate everybody who understands and can help and explain the reason
Kind regards