After a restart of my VM instances my site is down. I checked the IP address, but it didn't change. Do you have any ideas about what is wrong and how to fix it?
I run WordPress (Bitnami) on a Debian-based OS. I use Cloudflare CDN. I understand that on stopping a VM it doesn't keep the settings. Can I restore them?
About your last error message
Syntax OK (98)Address already in use: AH00072: make_sock: could not
bind to address 0.0.0.0:80 no listening sockets available, shutting
down AH00015: Unable to open logs /opt/bitnami/apache2/scripts/ctl.sh
: httpd could not be started Monitored apache
I have found similar errors due to Nginx, it could happen if you have it installed and it is creating conflicts. make sure you remove it as follow:
sudo apt-get remove nginx nginx-common
sudo apt-get autoremove #to remove unneeded dependencies
Your environment doesn't loose configuration "settings", but rather the servers that use those configurations will terminate their processes when the VM shuts downs and will need to be restarted.
The problem is likely that you need to restart both your Apache web server (which starts the PHP runtime and proxies HTTP requests) and your MySQL server (which is your database)...
Restart Apache:
sudo service apache2 restart
Restart MySQL:
sudo service mysql restart
OR
sudo /etc/init.d/mysql restart
EDIT: It appears your Bitnami image has a different configuration...
Start All services: sudo /opt/bitnami/ctlscript.sh start
Restart Apache: sudo /opt/bitnami/ctlscript.sh restart apache
Restart MySQL: sudo /opt/bitnami/ctlscript.sh restart mysql
Related
following this tutorial :
https://www.digitalocean.com/community/tutorials/how-to-redirect-www-to-non-www-with-nginx-on-centos-7
I modified my config file /etc/nginx/sites-available/domainName by adding on the last row :
return 301 $scheme://www.example.com$request_uri;
Then I launched :
sudo systemctl restart nginx
It works well. Then I tried to modify www.example.com by my domain name and I launched again ;
sudo systemctl restart nginx
but it doesn't work, I'm still redirecting to example.com
I checked the log files, sudo nginx -t etc and everything looks good.
Do you have an idea of the problem?
Thanks
Try clearing the DNS cache in your pc, browser, and router.
If you're using Windows to run a Linux server in a virtual box, you can run the ipconfig /displaydns command to see the time of cache to live.
I have done everything according to manuals from https://jfrog.com/open-source/ :
My Ubuntu version is 20.04. Since there is no "focal" in https://releases.jfrog.io/artifactory/artifactory-debs/, I've added "bionic":
$ cat /etc/apt/sources.list.d/artifactory.list
deb https://releases.jfrog.io/artifactory/artifactory-debs bionic main
Then I've installed jfrog-artifactory-oss version 7.12.6 and tried launching the service.
It has launched, but browser, connected to ports :8081 or :8082 of localhost, shows that 3 services don't start:
So, what does it need?
I came here, because I had the very same problem on docker.
I finally figured out, that inside the docker the environment variables http_proxy, https_proxy, HTTP_PROXY and HTTPS_PROXY where all set to localhost:8080. This caused the problem for me.
So when I start the docker this way, everything works as expected:
docker run --name artifactory-cpp-ce -ehttp_proxy="" -e https_proxy="" -e HTTP_PROXY="" -e HTTPS_PROXY="" -v $JFROG_HOME/artifactory/var/:/var/opt/jfrog/artifactory -d -p 8081:8081 -p 8082:8082 releases-docker.jfrog.io/jfrog/artifactory-cpp-ce:latest
On my machine, I found that libvirtd was running. It wasn't libvirtd, itself, that prevented artifactory from coming up. It was the fact that the virbr0 interface was up. It doesn't seem to be a problem bringing this interface back up after artifactory comes up.
For us this was on a Windows OS which was running McAfee Services. McAfee services listens on port 8081, same as the default Artifactory. Changing McAfee listening port was not an option for us.
I copied the JFROG_HOME\artifactory\var\etc\system.full-template.yaml, changed the name to system.yaml and searched for 8081 and changed it ( uncommented) to a different port. Restarted the Artifactory Service.
I have installed docker on windows , when I try to run hello-world for testing on docker. I get following error
Unable to find image
My computer is using proxy server for communication. I need to configure that server in the docker. I know proxy server address and port. Where I need to update this setting. I tried using https://docs.docker.com/network/proxy/#set-the-environment-variables-manually.
It is not working.
Try setting the proxy. Right click on the docker icon in system tray, go to settings, proxy and add the below settings:
"HTTPS_PROXY=http://<username>:<password>#<host>:<port>"
If you are looking to set a proxy on Linux, see here
The answer of Alexandre Mélard at question Cannot download Docker images behind a proxy works, here is the simplified version:
Find out the systemd script or init.d script path of the docker service by running:service docker status or systemctl status docker, for example in Ubuntu16.04 it's at /lib/systemd/system/docker.service
Edit the script for example sudo vim /lib/systemd/system/docker.service by adding the following in the [Service] section:
Environment="HTTP_PROXY=http://<proxy_host>:<port>"
Environment="HTTPS_PROXY=http://<proxy_host>:<port>"
Environment="NO_PROXY=<no_proxy_host_or_ip>,<e.g.:172.10.10.10>"
Reload and restart the daemon: sudo systemctl daemon-reload && sudo systemctl restart docker or sudo service docker restart
Verify: docker info | grep -i proxy should show something like:
HTTP Proxy: http://10.10.10.10:3128
HTTPS Proxy: http://10.10.10.10:3128
This adds the proxy for docker pull, which is the problem of the question. If for running or building docker a proxy is needed, either configure ~/.docker/config as the official docs explained, or change Dockerfile so there is proxy inside the container.
I had the same problem on a windows server and solved the problem by setting the environment variable HTTP_PROXY on powershell:
[Environment]::SetEnvironmentVariable("HTTP_PROXY", "http://username:password#proxy:port/", [EnvironmentVariableTarget]::Machine)
And then restarting docker:
Restart-Service docker
More information at Microsoft official proxy-configuration guide.
Note: The error returned when pulling image, with version 19.03.5, was connection refused.
I have noticed that when ever I start nginx with ubuntu command "nginx" and I do systemctl status nginx. It shows that systemctl is disabled. More over if I first start nginx with command systemctl start nginx and i try to start nginx with command nginx, it check the availbility of the ports and then says nginx: [emerg] still could not bind(). So i thought there must be a differene and their purpose. When I strt nginx with command nginx the only way to stop nginx is by the means of force using killlall nginx or kill -9 (process id) or by clearing the port. So I am pretty sure there is some difference in them.
The difference between the examples you have provied is how the processes are being started.
Running the command nginx will start the application and wait for your user action to stop it.
The systemctl or service commands are nearly the same thing and running service nginx start or systemctl start nginx will start a service in the background running the Nginx daemon.
You can also use this to do a service nginx restart or systemctl restart nginx to restart the service, or even a service nginx reload / systemctl reload nginx to reload the configuration without completely stopping the Nginx server.
The reason why you can't do both nginx and systemctl start nginx is due to the nginx configuration already listening port 80, and you can't listen on the same port on a single IP address at the same time.
You can also force the nginx service to start on boot by running systemctl enable nginx which will be why your systemctl status nginx returns 'disabled'.
Hope this makes sense.
service command is just a simple script which basically abstract choosing the underlying init system (upstart, systemmd , /etc/init.d or systemctl).
since it being a very concise script, it only supports a very limited set of operations (start | stop | reload .. ).
However, if you actually want to perform the additional operation you need to make use of the actual init system in this case systemctl
An apt example would be starting the service on boot time using systemctl sudo systemctl enable the-name-of-service which is not possible using service
I have 3 servers meant for openldap, phpldapadmin and client access. i have done phpldapadmin installation and i can access it through server 3 in browser http://example.local/ldapadmin
and in server 1 (openldap) i have open ldap protocol, port 389/tcp and install ldap:
yum install -y openldap openldap-clients openldap-servers
chkconfig slapd on
systemctl enable slapd
systemctl start slapd
but when i try to login it said:
can't contact ldap server (-1) for user
anyone knows how to configure openldap so it can use/manage by phpldapadmin remotely?
what configuration missing?
environment: centos 7
Thank you,
AnD
In order for this to work you have to make some modifications, after you have installed openldap and phplapadmin.
Luckily, you have centos 7 !! Just go follow these links
For Openldap, you must configure your ldap, follow this link
For phpldapadmin, follow this link
First check if openldap is accessible from the machine where phpldapadmin is installed using below command
telnet <ip-of-openldap-machine> 389
If you find port opened check below configuration settings from phpldapadmin config file. You will find config file under /etc/phpldapadmin/config.php
$servers->setValue('server','host','127.0.0.1');
$servers->setValue('server','base',array('dc=example,dc=com'));
$servers->setValue('login','bind_id','cn=admin,dc=example,dc=com');
This should do the work incase of vanilla installation of openldap server.
In /etc/phpldapadmin you will find a config.php file. In this file you specify the servers with the $server variable like this:
$servers->setValue('server','host','name_or_ip_of_your_server');
If the directory is missing you have not installed phpldapadmin correctly, to do that run:
sudo apt-get install phpldapadmin
or
sudo yum install phpldapadmin