centos 7 with virtualbox

Started by ed44rf, February 24, 2020, 08:49:52 AM

Previous topic - Next topic

ed44rf

Is any install tips?
I setup nat local ip 192.168.1.39
but I have 2 problems
nginx+apache dont want work together
all domains show 404 error on any files


ed44rf

I add line in /etc/hosts
192.168.1.39 test.com
and  test.com opens normal


rcschaff

1)  Used a bridged network.   A NAT network treats your host computer as a router behind a router.
2)  Setup your IP issued on you VM's IP as a DMZ.
3)  Make sure no port forwarding rules are setup to other boxes, they will override DMZ
4)  Make sure CWP is in NAT mode.
5)  After setting CWP to NAT mode, rebuild all configs.
Google Hangouts:  rcschaff82@gmail.com

ed44rf

#5
removed NAT network from virtualbox and start work
but display all files except php
log File does not exist: /usr/local/apache/htdocs/1.php
why apache use this directory and not using /home/k/public_html/q.com/1.php
here is part of apache config
<VirtualHost 192.168.1.39:8181>
        ServerName q.com
        ServerAlias www.q.com
        ServerAdmin webmaster@q.com
        DocumentRoot /home/k/public_html/q.com

rcschaff

if your running apache on 8181, you must be running nginx on 80/443.  Most likely an issue with php-fpm.

Check the error logs in
/usr/local/apache/domlogs/
/var/log/nginx
/var/log/messages | grep httpd
Google Hangouts:  rcschaff82@gmail.com

ed44rf

php fpm not installed and not sure it's the reason
now get strange situation- nginx+apache both use 80 port and nginx fail to start

rcschaff

if your running apache only, that's normal.  If your trying to run nginx+apache, then apache needs to change ports.  But nginx requires php-fpm, as it cannot runn on normal php. try yum install php-fpm
Google Hangouts:  rcschaff82@gmail.com

ed44rf

yum install php-fpm wants install old version 5.4.16-46.1.el7_7

Sandeep

we didn't support base php version from yum

ed44rf

here the solution
1 use bridge instead of nat
2 set manual ip instead of dhcp
3 enable nat in panel