Author Topic: centos 7 with virtualbox  (Read 7806 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
centos 7 with virtualbox
« on: February 24, 2020, 08:49:52 AM »
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


Offline
*
Re: centos 7 with virtualbox
« Reply #2 on: February 24, 2020, 09:11:21 AM »
I add line in /etc/hosts
192.168.1.39 test.com
and  test.com opens normal


Offline
****
Re: centos 7 with virtualbox
« Reply #4 on: February 24, 2020, 02:22:55 PM »
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

Offline
*
Re: centos 7 with virtualbox
« Reply #5 on: February 24, 2020, 06:49:52 PM »
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
« Last Edit: February 24, 2020, 06:53:24 PM by ed44rf »

Offline
****
Re: centos 7 with virtualbox
« Reply #6 on: February 25, 2020, 03:04:32 AM »
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

Offline
*
Re: centos 7 with virtualbox
« Reply #7 on: February 25, 2020, 05:13:26 AM »
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

Offline
****
Re: centos 7 with virtualbox
« Reply #8 on: February 25, 2020, 07:56:36 AM »
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

Offline
*
Re: centos 7 with virtualbox
« Reply #9 on: February 25, 2020, 11:50:52 AM »
yum install php-fpm wants install old version 5.4.16-46.1.el7_7

Offline
*****
Re: centos 7 with virtualbox
« Reply #10 on: February 25, 2020, 12:24:19 PM »
we didn't support base php version from yum

Offline
*
Re: centos 7 with virtualbox
« Reply #11 on: February 29, 2020, 09:25:00 AM »
here the solution
1 use bridge instead of nat
2 set manual ip instead of dhcp
3 enable nat in panel