All posts by PF

CentOS 7 – allowing port 80 & 443 httpd

Easy!

Run

firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent

and then…

firewall-cmd --reload

 

How to check the zones?

firewall-cmd --get-zones

 

If you can’t connect to the server/page…

or with curl…

hell:~ pjrfigueiredo$ curl https://www.domain.com
curl: (7) Failed to connect to www.domain.com port 443: Connection refused

Check if anything is listening to 443

sudo netstat -lnp | grep 443

If nothing show up… try to edit the domain httpd configuration file… and make it so, that httpd is listening to it… like for example

<VirtualHost *:80 *:443>

 

 

 

mysql – #1241 – Operand should contain 1 column(s)

So!, I was/am writing a subquery to get a value to rating_stars… and I got this (beginner) error…

mysql – #1241 – Operand should contain 1 column(s)

(SELECT value, (sum(value)/count(value)) FROM model_ratings WHERE modelId = id) AS rating_stars

Subquery should return one column, whatever corresponds to rating_stars.

(...) (SELECT (sum(value)/count(value)) FROM model_ratings WHERE modelId = id) AS rating_stars (...)