WP2Static cURL error: Could not resolve host: statics.mydomain.com - wordpress

I have a problem, with the plugin WP2Static in wordpress, when generating statics files, the folder is created well but not the files.
Export log:
cURL error: Could not resolve host: statics.mydomain.com
I'm using a VPS with Debian 9.
wordpress version: 5.2.1
WP2Static version: 6.6.5
I use Docker to generate my wordpress.
PS: The domain name used does not exist (statics.mydomain.com), I add it to the hosts file.
Target Directory:
/var/www/html/statics/site1
I installed the project on a VirtualBox and the plugin works fine. The problem must come from the DNS but I can not find the solution!
Have you ever had this problem ? Do you have any suggestions?
Thank you so much!

This is as you suspect a DNS resolution issue.
When you add the entry to your hosts file, I presume this is on your host.
The docker container running your application also needs to know where statics.mydomain.com resolves to.
Add an entry to the hosts file within your container running WordPress. You can then test by running cURL on CLI within that container.
WP2Static uses WordPress's knowledge of the Site URL and Home URLs from its Settings area. Ensure that these are also set to statics.mydomain.com and not overridden via wp-config.php.

Related

installation of wordpress with xampp

I want to install Wordpress on my pc so first, I need to install xampp.
After installation when I'm trying to start apache it is automatically shutting down. So I changed the localhost port number to 8080 then it started.
But now the problem is when I'm trying to run Wordpress it is not opening correctly.
Here is a screenshot of my error. Please help with installation of Wordpress with the xampp
I think you have to check first if any other html file is working fine or not on the root directory inside (www) folder. If its working fine then try with http://localhost/wpfive
see my example screenshot for this.
Best of luck

Wordpress Database Connection Error - PHP7 using MAMP

I have a localhost development environment using MAMP Pro, with a Wordpress website working successfully using PHP 5.6.8. Changing the host to PHP 7.0.13 (and changing nothing else) results in the error:
Warning: mysqli_real_connect(): (HY000/2002): No such file or
directory in [edited path]/wp-includes/wp-db.php on line 1538
Error establishing a database connection
This either means that the username and password information in your
wp-config.php file is incorrect or we can’t contact the database
server at localhost:3306. This could mean your host’s database server
is down.
Screenshot of Complete Error
wp-config.php definitely has correct username, password, hostname and the database is running. Solutions to similar issues/warnings suggest the MySQL socket path in php.ini file could be wrong, but I have compared that file across the two php versions and they are the same.
I am using the latest versions of MAMP Pro (4.1) and Wordpress (4.7.4), as well as OS X (10.12.4). Also, the website works fine again when changing the host back to PHP 5.6.8.
No idea what else to do/check. Any thoughts are much appreciated.
Wordpress 4.6 later version is not supported in Php 7.0 So please Reinstall Php 5.6 and check .so working
After updating to PHP7 you need to check the path to the mysql.sock.
Open the php.ini file and correct the path
mysql.default_socket = /Applications/MAMP/bin/IDONTKNOW...../mysql.sock

Sulu CMS not working after installation

Trying to install and configure Sulu CMS.
I am using Homestead and have configured the vhosts to welcome a new site and have run vagrant provision:
sites:
- map: sulu.cms
to: /home/vagrant/Code/sulu_cms/public
I have pulled sulu-standard from the GIT repo, checkedout, ran composer install and followed the instructions given here to the dot. I am also using the Nginx configuration shown here and the default Webspace provided by the installation.
However, when trying to access the host after I am getting a 502 Bad Gateway error. Could anyone enlighten me on the issue?
I am running Homestead on Windows 10, I have a couple of other Laravel-based projects running in the same Homestead box without any issues.
You've also created an issue for that on Github and posted the answer there. You've mentioned there that the vagrant mapping was incorrect, because it showed to a non-existent public directory instead of the web directory.
So the correct vagrant mapping would look like this:
sites:
- map: sulu.cms
to: /home/vagrant/Code/sulu_cms/web
Would be nice if you could also mark this as the accepted answer, or create a more detailed one on your own.

Docker: how to manage development and production settings?

I'm just getting started with Docker. With the official NGINX image on my OSX development machine (with Docker Machine as the Docker host) I ran up against the bug with sendfile and VirtualBox which means the server fails to show changes I make to files.
The workaround for this is to use a modified nginx.conf file that turns off sendfile. This guy's solution has an instruction in the Dockerfile to copy a customised conf file into the container. Alternatively, this guy maps the NGINX configuration to a new folder with modified conf file.
This kind of thing works OK locally. But what if I don't need this modification on my cloud host? How should I handle this and other differences when it comes to deployment?
You could mount your custom nginx.conf into the container in development via e.g. --volume ./nginx/nginx.conf:/etc/nginx/nginx.conf and simply omit this parameter to docker run in production.
If using docker-compose, the two options I would recommend are:
Employ the limited support for environment variable interpolation and add something like the following under volumes in your container definition: ./nginx/nginx.${APP_ENV}.conf:/etc/nginx/nginx.conf
Use a separate YAML file for production overrides.

Forbidden message when serving a sinatra local site using nginx passenger

I've followed the instructions for installing phusion passenger with nginx in ubuntu. I had some issues while installing since I use rvm and I had to install as root and the installer was failing to find rake so i temporarily chmoded /opt to be owned by my user and after installation I resetted ownership to root. I can see nginx welcome page but when I try to visit a sinatra app I get forbidden, the virtual host is pointed to the sinatra app public dir and the permissions for the whole app are 777.
Try Passenger 3. It automatically detects most permission problems and tells you how to fix them.
If this is for a production system, you really don't need the flexibility of RVM as you should be using a single stable version of Ruby and Rails for Phusion. Install the version you need, using Aptitude if that version is available, and be done with it.
Because this is the page that Google brought me to for my issue, which isn't a Passenger issue, but a Nginx reverse-proxy issue, you need to add the line
disable :protection
somewhere in your sinatra app. I have mine at the very end, outside any method (in global scope).
Well my mistake was not using rvmsudo to install nginx with passenger, instructions here: http://rvm.io/integration/passenger/.

Resources