doing the initial setup for apache, and myphp, I get this message when I try to restart my apache:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.1.72. Set the 'ServerName' directive globally to suppress this message
This should be a warning not a problem with Apache server.
If you insert below line in either httpd.conf or apache2.conf in /etc/apache2 and restart apache the notice will disappear.
ServerName localhost
It will not work for virtual host. Make sure you have defined server name inside /etc/hosts with specific ip address
Related
I have 3 sites.
One runs on port 80, one runs on port 1337, and one runs on port 256.
I created both of the first two with just command line utils and the last one, the one that isn't working, from webmin on a chromebook. The server is being hosted on a Raspberry Pi 3 and none of the sites have too high of a memory limit (only about 100MB).The last site, the one running on port 256, isn't functioning properly. It returns an ERR_CONNECTION_REFUSED error in Google Chrome and I don't currently have the ability to check on the Pi itself. I have restarted Apache and the Pi.
What am I doing wrong? I'm using Apache2 and I'm signed in as root.
UPDATE: In Webmin, after running wget localhost:256, I've encountered this error:
--2021-01-13 10:25:43-- http://localhost:256/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:256... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:256... failed: Connection refused.
It's not just an issue with my laptop. This is an Apache configuration problem, it appears.
ANOTHER UPDATE: Here's the configuration file:
<VirtualHost _default_:256>
DocumentRoot /var/www/wiki
<Directory "/var/www/wiki">
allow from all
Options None
Require all granted
</Directory>
</VirtualHost>
Make sure apache is listening on the ports. You can use netstat:
netstat -tupan | grep -i listen
If the 3 ports are liste, the problem might be elsewhere.
If a port is missing, check if httpd.conf contains this line:
Listen 256
If it does, check error logs for some error that will help you find what's wrong.
I am running Ubuntu 18.04 in a VM. When I check the hostname using hostname or the fully qualified domain name using hostname -f, hostname --fqdn or hostnamectl I get the default ubuntu for each. I want to permanently update the hostname to host and the fully qualified domain name to host.okd.dns.
I have changed the file /etc/hostname to include only the name host. I have also changed the file /etc/hosts to appear as follows (excluding IPv6 hosts):
127.0.0.1 localhost
127.0.1.1 host.okd.dns
After saving and rebooting the VM, when I check hostname it returns host as expected, but when I check the FQDN using hostname -f, hostname --fqdn or hostnamectl it also returns host only without the .okd.dns appended to it as I would expect.
There seem to be several methods of updating the FQDN for Ubuntu 18.04 and I have tried most of them, including this method, which seems to be the most common. What do I need to do to get the changes to the FQDN to update and stick?
Apparently, I needed to add host after host.okd.dns in the /etc/hosts file. I was sure I had tried this in the past, but perhaps there was some other error I had made somewhere and this wasn't reflected. Once doing this and after a reboot, hostname -f and hostname --fqdn both return host.okd.dns as expected.
I know almost nothing about nginx, please help me to see if it can be achieved ?
A public network IP with only 80 and 8080 ports open, Such as 182.148.???.135
A domain name with an SSL certificate, Such as mini.????.com
This domain name can resolve to this IP.
Using the above conditions, how to enable https ? So that I can pass visit https://mini.????.com to the target server 182.148.???.135
Thank you very much for your help!
Just came accross an issue. Doesn’t matter if its a local setup or one with a domain name.
When you create a symbolic frpom sites-available to sites-enabled you have to use the whole path to each location.
e.g. you can’t
cd /etc/nginx/sites-available/
ln -s monitor ../sites-enabled/
It has to be:
ln -s /etc/nginx/sites-available/monitor /etc/nginx/sites-enabled/
Inside /etc/nginx/sites-available you should have just edited the default file to change the root web folder you specified and left the server name part alone. Restart nginx, should work fine. You don’t need to specify the IP of your droplet. That’s the whole purpose of the default file.
You only need to copy the default file and change server names when you want to set up virtual hosts.
I'm using XAMPP as my local apache server. For some reason I can't use Port 80 and hence I changed the Listen and Servername to localhost:8080.
Now when I'm trying to install a wordpress site I'm getting the below error if I put localhost:3306 or localhost
wp-installation-error
And If I try to specify localhost:8080 as DB host, it goes into a "waiting for localhost" and times out after few minutes.
setup
Can someone help me how to set it up?
Previously my IP was 10.0.6.63 , the apache server was working fine.
On reboot DHCP changed my IP address to 10.0.15.12 Now when i try to start apache it is giving me following error
$service httpd restart
Starting httpd: [Fri Jan 11 16:17:28 2013] [warn] module wsgi_module is already loaded, skipping
(99)Cannot assign requested address: make_sock: could not bind to address 10.0.6.63:80
no listening sockets available, shutting down
Unable to open logs
If you are working with a moving IP address do no use IP based virtualhosts but named based virtulahosts.
Check this apache documentation link
Solved: Sorry guys, mistake. I had another configuration in /etc which was overriding the local configuration . which was configured for old ip.
I think you can check httpd.conf(default config file name) config file.
#Listen 12.34.56.78:80
you can change you server ip address .
I had a similar problem.
I resolved it by disabling or commenting out
this line Listen 192.168.1.80:80 in /etc/httpd/conf.d/ssl.conf.
I am running Virtualmin on a Centos 5.11
In the /etc/httpd/conf.d/ssl.conf file:
#LoadModule ssl_module modules/mod_ssl.so
#Listen 443
Comment out these lines
I was facing similar problem with apache but when i checked , I got that, the particular IP address on which my server is trying to bind is not there as that interface was deleted when my machine was rebooted.
I did following :
run dhclient to get the interface and IP
given command to create the sub interface which I had created for my apache server to listen : ifconfig ens6:1 10.10.0.80/16 up