-2

On my server, XML files are handled by Nginx. They should be handled by Apache so that .htaccess file is working

I have checked the cURL not working properly

When I run the command curl -I https://www.example.com/sitemap.xml

curl: (7) Failed to connect
Failed to connect on all port

nginx -t
nginx: [emerg] BIO_new_file("/home/admin/conf/web/ssl.xvids.cc.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/home/admin/conf/web/ssl.xvids.cc.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)

nginx: configuration file /etc/nginx/nginx.conf test failed

/var/log/syslog

Aug  9 06:25:25 srv named[30476]: client 104.42.128.152#51441 (hostsahibi2.dnsservis.com): query (cache) 'hostsahibi2.dnsservis.com/A/IN' denied

ls -l /home/admin/conf/web/

total 144
-rw-r----- 1 root admin 11402 Aug  9 09:53 apache2.conf
-rw-r----- 1 root admin 12517 Aug  9 10:18 nginx.conf
-rw-r----- 1 root root  11268 Jul 24 15:02 nginx.conf.backup
-rw-r--r-- 1 root root    147 Aug  9 09:53 nginx.dev.xvids.cc.conf_letsencrypt
-rw-r--r-- 1 root root    147 Jul 20 20:05 nginx.xchum.com.conf_letsencrypt
-rw-r--r-- 1 root root    147 Jul 19 13:39 nginx.xvids.cc.conf_letsencrypt
-rw-r--r-- 1 root root    147 Jul 20 20:52 nginx.xvids.in.conf_letsencrypt
drwxr-xr-x 2 root root   4096 Jul 19 13:35 old_server
-rw-r--r-- 1 root root     68 Jul 18 20:56 pam.htpasswd
-rw-r----- 1 root admin  4591 Aug  9 10:43 sapache2.conf
-rw-r----- 1 root admin  4903 Aug  9 10:53 snginx.conf
-rw-r----- 1 root admin  5186 Aug  9 10:21 snginx.conf.save
-rw-r----- 1 root root   1647 Aug  9 09:53 ssl.dev.xvids.cc.ca
-rw-r----- 1 root root   2134 Aug  9 09:53 ssl.dev.xvids.cc.crt
-rw-r----- 1 root root   3243 Aug  9 09:53 ssl.dev.xvids.cc.key
-rw-r----- 1 root root   3782 Aug  9 09:53 ssl.dev.xvids.cc.pem
-rw-r----- 1 root root   1647 Jul 20 20:31 ssl.xchum.com.ca
-rw-r----- 1 root root   2147 Jul 20 20:31 ssl.xchum.com.crt
-rw-r----- 1 root root   3243 Jul 20 20:31 ssl.xchum.com.key
-rw-r----- 1 root root   3795 Jul 20 20:31 ssl.xchum.com.pem
-rw-r----- 1 root root   5625 Aug  9 10:43 ssl.xvids.cc.ca
-rw-r----- 1 root root   2223 Aug  9 10:43 ssl.xvids.cc.crt
-rw-r----- 1 root root   3243 Aug  9 10:43 ssl.xvids.cc.key
-rw-r----- 1 root root   7849 Aug  9 10:43 ssl.xvids.cc.pem
Jenny D
  • 27,780
  • 21
  • 75
  • 114
maks
  • 1
  • 2
  • 1
    It seems that you don't have a web server running on your machine. There's no way anyone can help you with the tiny amount of information you've provided. We'd need to see a netstat output, Apache and Nginx configurations. If you want help please edit your question to include that information, in a well formatted way, along with any other information you have that's relevant. Don't try to give it in comments. – Tim Aug 08 '17 at 19:46

1 Answers1

0

Your Nginx web server is not running. You are trying to enable https on your Nginx but you don't load the SSL certificates files from the correct path.

directory:fopen('/home/admin/conf/web/ssl.xvids.cc.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file

Do you have a valid certificate? If yes, you have to define the correct paths in the Nginx's configuration file in the following directives.

ssl_certificate path-for-crt;
ssl_certificate_key path-for-key;
dkokmadis
  • 574
  • 2
  • 9