Build WordPress website on a CentOS 6.5 server.
-
After installing everything My site is working I can access it using Lynx ( lynx is on the Server)
but I cannot access the site using my Desktop. -
CentOS comes with a firewall that blocks most traffic by default (everything except SSH and ICMP.) You need to allow HTTP through the firewall. Two ways of doing this:
-
Run system-config-firewall, go Customize, but a "*" beside "WWW (HTTP)" in the list, then Close, then OK, then Yes
-
Run these commands from the shell:
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
service iptables save -
-
@jasonh said:
CentOS comes with a firewall that blocks most traffic by default (everything except SSH and ICMP.) You need to allow HTTP through the firewall. Two ways of doing this:
-
Run system-config-firewall, go Customize, but a "*" beside "WWW (HTTP)" in the list, then Close, then OK, then Yes
-
Run these commands from the shell:
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
service iptables saveThank You. I did try that,but i cannot access my site .:(
-
-
Are you able to ping the server from your desktop?
-
@jasonh said:
Are you able to ping the server from your desktop?
She can see the site up now.
This is the URL: http://119.9.77.226/
-
@scottalanmiller said:
@jasonh said:
Are you able to ping the server from your desktop?
She can see the site up now.
This is the URL: http://119.9.77.226/
shows Error establishing a database connection.
DB credentials correct?
-
I have found, incorrectly typing in the database name and database username is the culprit.
On my CentOS box with cPanel, database name is techno_name-of-database, database username is techno_admin.
-
Thank you for you replies i will my database again
-
@ambarishrh said:
@scottalanmiller said:
@jasonh said:
Are you able to ping the server from your desktop?
She can see the site up now.
This is the URL: http://119.9.77.226/
shows Error establishing a database connection.
DB credentials correct
I modified my my settings in "/etc/httpd/conf/httpd.conf" after that i restarted the Apache.and now its unable to start again.it says -
@Joyfano said:
@ambarishrh said:
@scottalanmiller said:
@jasonh said:
Are you able to ping the server from your desktop?
She can see the site up now.
This is the URL: http://119.9.77.226/
shows Error establishing a database connection.
DB credentials correct
I modified my my settings in "/etc/httpd/conf/httpd.conf" after that i restarted the Apache.and now its unable to start again.it saysI just resolved this error. Will check again if my Apache is able to start
-
I am stuck again cannot access my localhost right now, If i am accessing it using lynx ( running in centos) it says unable to contact localhost.
Except modifying the WP-config.php i also modified my VirtualHost.
Still working on how to fix my localhost -
@Joyfano said:
I am stuck again cannot access my localhost right now, If i am accessing it using lynx ( running in centos) it says unable to contact localhost.
Except modifying the WP-config.php i also modified my VirtualHost.
Still working on how to fix my localhostWell, since you were able to access the site before you didn't need to touch the VirtualHost settings. So just put that back to the way that it was before.
-
@scottalanmiller said:
@Joyfano said:
I am stuck again cannot access my localhost right now, If i am accessing it using lynx ( running in centos) it says unable to contact localhost.
Except modifying the WP-config.php i also modified my VirtualHost.
Still working on how to fix my localhostWell, since you were able to access the site before you didn't need to touch the VirtualHost settings. So just put that back to the way that it was before.
I now fixed and the syntax and also set the default VirtualHost. I still cannot access my Localhost using my Lynx (running in Centos server).
-
@Joyfano said:
@scottalanmiller said:
@Joyfano said:
I am stuck again cannot access my localhost right now, If i am accessing it using lynx ( running in centos) it says unable to contact localhost.
Except modifying the WP-config.php i also modified my VirtualHost.
Still working on how to fix my localhostWell, since you were able to access the site before you didn't need to touch the VirtualHost settings. So just put that back to the way that it was before.
I now fixed and the syntax and also set the default VirtualHost. I still cannot access my Localhost using my Lynx (running in Centos server).
You returned the file to exactly how it was before you changed it?
-
@Joyfano Remember the golden rule!
Always take backup of any config file before you make any changes, so in case something goes wrong, you can always rename the backup file to original and check.
-
@ambarishrh said:
@Joyfano Remember the golden rule!
Always take backup of any config file before you make any changes, so in case something goes wrong, you can always rename the backup file to original and check.
Very good advice
-
@scottalanmiller Thanks! I learned this the hard way!
-
@ambarishrh said:
@Joyfano Remember the golden rule!
Always take backup of any config file before you make any changes, so in case something goes wrong, you can always rename the backup file to original and check.
Thank you. i just learned that today. I edited my config file without any back up
-
I am now working on how to find the correct wp-config.php.
Is there any way/command that i can use to find it quickly? -
@Joyfano you have to know what directory your web server is using.