WordPress + Cloudflare SSL redirects to apache root?

We recently deployed our new website and when trying to use it over SSL with cloudflare, it redirects to the Apache root dir?

I generated origin TLS certificates and downloaded those from cloudflare for the domain and then configured the virtual host to use SSL:

<VirtualHost *:443>          ServerAdmin webmaster@domain.com         ServerName domain.com         ServerAlias www.domain.com         DocumentRoot /home/domain/public_html         SSLEngine on         SSLCertificateFile /etc/apache2/cert/domain.com.pem         SSLCertificateKeyFile /etc/apache2/cert/domain.com.key         # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,         # error, crit, alert, emerg.         # It is also possible to configure the loglevel for particular         # modules, e.g.         #LogLevel info ssl:warn          ErrorLog $  {APACHE_LOG_DIR}/error.log         CustomLog $  {APACHE_LOG_DIR}/access.log combined  </VirtualHost>  # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 

I’ve tried cloudflares flexible, full and strict SSL setting.

But for some reason, it still goes to the default dir of apache?

I just cannot grasp why.

por que no carga dos imagenes y un archivo js en cloudflare por medio de https?

necesitaba un certificado SSL para mi pagina y utilice CloudFlare para obtener uno, hasta ahí todo bien, pude instalarlo. Pero tengo un problema, al cargar la pagina, carga todo menos dos imagenes y un archivo js, todo tiene direccion con protocolo https, no entiendo donde esta el error, funcionaba bien antes de ponerle el SSL.

introducir la descripción de la imagen aquí

la pagina es: https://saltapersonalizados.com/

y las direcciones que no me toman son:




pero sin protocolo https las agarra bien




me podrían orientar por favor, donde yace el error? como lo soluciono?

Correct MX Configuration for Cloudflare

I’ve always assumed that if I use an external nameserver (like Cloudflare) for a domain, then my local WHM nameserver is completely bypassed for that domain. Is this correct?

I’ve always pointed MX records to external services like Office 365 and Gmail, so I’m a little confused as I try to use a local mail account for the first time. Here are the combinations I’ve tried on Cloudflare – can someone help me understand which one is correct in principle?

  1. An MX record pointing subdomain “mail” to “mail.domain.tld” and an A record pointing subdomain “mail” to my IP address
  2. An MX record pointing subdomain “mail” to “mail.domain.tld” and a CNAME record pointing subdomain “mail” to “domain.tld” (there’s always an A record pointing “domain.tld” to my IP address)
  3. An MX record pointing subdomain “mail” to “mail.domain.tld” and no A or CNAME record for subdomain “mail”
  4. An MX record pointing “domain.tld” (@) to “mail.domain.tld” and an A record pointing subdomain “mail” to my IP address
  5. An MX record pointing “domain.tld” (@) to “mail.domain.tld” and a CNAME record pointing subdomain “mail” to “domain.tld” (there’s always an A record pointing “domain.tld” to my IP address)
  6. An MX record pointing “domain.tld” (@) to “mail.domain.tld” and no A or CNAME record for subdomain “mail”

Ironically, setting up a CNAME for “webmail” pointing to “@” worked immediately and at least one of the configurations above allowed me to receive mail. It’s logging into the server remotely that is giving me trouble.


Hostpoco Special – $12/Year – SSD Hosting | cPanel | Softaculous | CloudFlare | Sitebuilder

Web hosting is mandatory and need of every one who is dealing with websites. Shared hosting is one of the cheaper and affordable solution in web hosting types. Shared hosting have options like Linux shared hosting and Windows Shared hosting. We at Hostpoco.com offers both platform shared hosting services and price is as cheap as compared with your daily snaks like burger. Hostpoco.com offers high speed cheap SSD hosting services starting from $ 1 / Month.

Our SSD Hosting plan comes with…

Hostpoco Special – $ 12/Year – SSD Hosting | cPanel | Softaculous | CloudFlare | Sitebuilder

Как подключить клиент к серверу через cloudflare

Есть клиент-север, есть прога для тестирования соединения, есть домен через cloudflare, но если добавить srv запись _myserver._tcp.domen.name. SRV 0 5 30777 domen.name., то подключиться через domen.name:30777 не получается. Где я не прав, и что нужно прочитать?

Security Level do cloudflare não muda com via curl [pendente]

Estou tentando da seguinte forma:

    $  ch = curl_init();     curl_setopt($  ch, CURLOPT_URL, "https://api.cloudflare.com/client/v4/zones/zoneId/setings/security_level");     curl_setopt($  ch, CURLOPT_HEADER, array('X-Auth-Email'=>'Email','X-Auth-Key'=>'Api_key','Content-Type'=>'application/json'));     curl_setopt($  ch, CURLOPT_POSTFIELDS, array('value' => 'MEDIUM'));     curl_setopt($  ch, CURLOPT_SSL_VERIFYPEER, false);     curl_setopt($  ch, CURLOPT_RETURNTRANSFER, 1);     $  data = curl_exec($  ch); 

O que recebo:

{   "success":false,   "errors":[     {       "code":7003,       "message":"Could not route to /zones/670943b1aa554c24e8f0b88ace471646041b0/settings/security_level, perhaps your object identifier is invalid?"     },     {       "code":7000,       "message":"No route for that URI"     }   ],   "messages":[],   "result":null } resource(12) of type (Unknown) 

Como eu poderia fazer da forma correta?

CloudFlare Dynamic DNS Update Script

I have a computer that roams, but needs to have an FQDN attached to it for certain reasons such as email system integrations or testing email via a testing SMTP server that requires valid FQDNs and HELOs.

My domain(s) are all on CloudFlare, so I wrote an adapted version of another script I had to wrap around CloudFlare’s API so I can update DNS entries and such.

This has a few requirements from PyPI:

  • ipaddress
  • CloudFlare python wrapper (cloudflare on PyPI)

This script also has two other requirements to really function, but I can guarantee you that both of these components work:

  • WhatIsMyIP.com API key for IP lookup capabilities
  • CloudFlare Account with API key

Note that any sensitive information (such as login credentials or API keys) have been obfuscated in the below code. Additional bits can be provided as needed.

(There is a known limitation that this does not work for IPv6 addresses – I’m working on adding this, but this current iteration of the script does not have IPv6 in it.)

Critiques to improve the script are welcome, but keep in mind that I abide by PEP8 about linelengths <= 120 chars long because this is permissible if users on a team/development group agree on the longer length.

#!/usr/bin/python3  import CloudFlare import ipaddress import json import shlex import subprocess as sp import syslog import urllib.error import urllib.request  from typing import AnyStr, Optional   # Used for `dig` queries because we are using CloudFlare, and we need actual DNS results, not CF results for checking # the existence of an IP address currently.  Therefore, we use Google DNS here. DNS_NAMESERVER = ""  # ZONE = root domain # DOMAIN = hostname within root domain. ZONE = "domain.tld" DOMAIN = "subdomain"  # These next two are for WHATISMYIP - API Endpoints. WHATISMYIP = "https://api.whatismyip.com/ip.php?key={key}&output=json" API_KEYS = ['WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY',             'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ']   # Wrapper function around syslog to allow default priority of INFO, but # has the ability to change the priority if wished for a given message. def _syslog(message: AnyStr, priority: int = syslog.LOG_INFO) -> None:     syslog.syslog(priority, message)   # Horribly unnecessary wrapper function around `exit` which calls the # "Process Ended" log message, and then actually exists with the given # exit code (by default it exits on 0 - the "Success" exit code) def _exit(code=0):     # type: (int) -> None     _syslog("DDNS Update Process Ended.")     exit(code)   # Singular Error handler for EmptyDNSResponse (could probably be a bare # LookupError, but EmptyDNSResponse is nicer...) class EmptyDNSResponse(LookupError):     pass  # No changes from base LookupError   # Get current public IP address with WhatIsMyIP.com API def _get_current_ip_address():     # type: () -> Optional[AnyStr]     for key in API_KEYS:         _syslog("Attempting lookup with API key {key}...".format(key=key))         try:             with urllib.request.urlopen(WHATISMYIP.format(key=key)) as req:                 data = json.loads(req.read().decode("UTF-8"))                 ipaddr = data['ip_address'][1]['result']         except (urllib.error.URLError, urllib.error.HTTPError):             _syslog("Could not look up public IP address, aborting update process.")             _exit(1)          try:             # noinspection PyUnboundLocalVariable             ipaddress.ip_address(ipaddr)         except ValueError:             if data is '0':                 _syslog("API key was not entered for lookup, this is a programming error.", syslog.LOG_CRIT)                 _exit(5)              if data in ['1', '2']:                 _syslog("API Key Invalid or Inactive, attempting to try other keys...", syslog.LOG_WARNING)              if data is '3':                 _syslog("API key lookup threshold reached, skipping to next API key...", syslog.LOG_WARNING)              if data in ['4', '5']:                 _syslog("Query is bad, it needs 'input', which we can't do. This is a critical issue.",                         syslog.LOG_CRIT)                 _exit(6)              if data is '6':                 _syslog("There was an unknown error with the WhatIsMyIP API, contact their support.",                         syslog.LOG_CRIT)                 _exit(7)              continue  # Try next API key          return data   # Check if the DNS entry for a given hostname differs from current IP, # and if it has no A record or it differs, return "True". Otherwise, # return False, and assume the IP address doesn't differ. def _dns_ip_address_status(host: AnyStr, curip: Optional[AnyStr] = None) -> AnyStr:      if not curip:         raise RuntimeError("Empty IP!")      dnsip = ""     try:         dnsip = sp.check_output(             shlex.split('dig +short @{nameserver} A {hostname}'.format(nameserver=DNS_NAMESERVER, hostname=host))         ).decode('utf-8').strip()          if dnsip == '':             _syslog('Current IP record for \'{hostname}\': [NXDOMAIN]'.format(hostname=host), syslog.LOG_INFO)             raise EmptyDNSResponse         else:             _syslog('Current IP record for \'{hostname}\': {record}'.format(hostname=host, record=dnsip))     except sp.CalledProcessError as err:         syslog.syslog(syslog.LOG_CRIT, 'Subprocess error when calling `dig`, exiting.')         print("Subprocess error when calling dig: {}".format(err))         _exit(2)  # Exit on code 10: Can't continue if subprocess isn't working...     except EmptyDNSResponse:         syslog.syslog(syslog.LOG_INFO, "Empty DNS response, assuming that entry doesn't exist.")         # Assume that the IP address differs or doesn't exist.         return "NXDOMAIN"      if dnsip == curip:         return "UPTODATE"     else:         return "NEEDSUPDATED"   # CloudFlare has different functions for Add and Change.  Determine if we exist first. def _update_cloudflare(cf: CloudFlare.CloudFlare, domain: AnyStr = ZONE, hostname: AnyStr = DOMAIN):     # Validate that zone exists first.     zone_id = None     try:         zone = cf.zones.get(params={'name': domain})         if len(zone) < 1:             raise LookupError         else:             zone_id = zone[0]['id']     except LookupError:         syslog.syslog(syslog.LOG_ERR, "No valid zone data on CloudFlare, root domain zone might not exist.")         _exit(3)      curip = _get_current_ip_address()     if not curip:         syslog.syslog(syslog.LOG_ERR, "Could not find valid current IP address, aborting update process.")         _exit(2)      fqdn = hostname + '.' + domain      ip_status = _dns_ip_address_status(host=fqdn, curip=curip)     if ip_status == "NXDOMAIN":         # Add new record: POST         cf.zones.dns_records.post(zone_id, data={'name': hostname, 'type': 'A', 'content': curip,                                                  'proxiable': False, 'proxied': False})     elif ip_status == "NEEDSUPDATED":         dns_records = cf.zones.dns_records.get(zone_id, params={'name': fqdn})         if len(dns_records) != 1:             syslog.syslog(syslog.LOG_ERR,                           "Invalid number of records returned, this might be a CF DNS records issue, check it.")             _exit(4)          dns_record_id = dns_records[0]['id']         cf.zones.dns_records.delete(zone_id, dns_record_id)          cf.zones.dns_records.post(zone_id, data={'name': hostname, 'type': 'A', 'content': curip,                                                  'proxiable': False, 'proxied': False})      elif ip_status == "UPTODATE":         syslog.syslog(syslog.LOG_INFO, "DNS record for {} does not need adjusted.".format(fqdn))         pass   def execute():     syslog.openlog(ident='py-ddns-ipupdate', logoption=syslog.LOG_PID, facility=syslog.LOG_DAEMON)     _syslog("DDNS Update Process Started.")      # Test if Internet is up by reaching to Google.     try:         req = urllib.request.urlopen('https://google.com', timeout=5)         req.close()     except urllib.error.URLError:         _syslog("No Internet connection available, aborting update process.")         _exit(1)      # Get current public IP     ip = _get_current_ip_address()     if '.' not in ip and ':' not in ip:         _syslog("Unexpected response from WhatIsMyIP.com API: {response}".format(response=ip))         _exit(1)     else:         _syslog("Current Public IP: {ip}".format(ip=ip))      _update_cloudflare(CloudFlare.CloudFlare(email='valid@email.address',                                              token='CloudFlareAPITokenKey',                                              debug=False))      _exit(0)   if __name__ == "__main__":     execute() 

Google Cloud Hosting and CloudFlare Private Server

I am little new to hosting and so I am confused for take step. My current situation is like below

I have one big wordpress site in site ground. Domain is from Godaddy and I am using CloudFlar. I want move this site on Google cloud Instance. So I have created Google cloud instance and have installed Cpanel/WHM. I have copied site on newly created cpanel account. Now My confusion is How I should change DNS for point my domain to Google cloud.

Domain on : Godaddy, Using CloudFlare : Yes, Current Hosting : Site Ground, New Destination Hosting : Google Cloud, My Current Domain : example.com

For More information I have setup host like host.example.com and NameServer as ns1.example.com and ns2.example.com on Google cloud. Let me know someone can help me for required step to change DNS so I can successfully move without downtime.

Thanks a lot.