Transffering Domain Problems (Nginx, Wordpress)

March 26, 2016 1.3k views
Nginx WordPress PHP Let's Encrypt DNS DigitalOcean Ubuntu

Hello, I am having a bit of a problem and hopefully someone can lead me in the right direction. I want to transfer my website from https://dulic.me to https://damir.tech

The process is done, however take a look at https://damir.tech
I am not sure what is causing that problem. Its not loading the .css and .js elements of the website. Let's Encrypt is configured correctly and the website url is swapped in wordpress. Is there anything else that is needed to be done that I am not aware of? Maybe I messed up somewhere in Nginx since I did swap from 1.4 to 1.9.12
Here is my /etc/nginx/conf.d/default.conf:

server {
    listen 80;
    ##Listening with SSL and HTTP/2
    listen   443 ssl http2;
    ##IPv6 support
    listen   [::]:443 ipv6only=on ssl http2;

    root   /var/www/html;
    index index.php  index.html index.htm;

    server_name damir.tech;
    #!Lets Encrypt Certificates!
    ssl_certificate /etc/letsencrypt/live/damir.tech/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/damir.tech/privkey.pem;

    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 10m;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

    ssl_prefer_server_ciphers on;
    ssl_ciphers 'ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:!ADH:!AECDH:!MD5';

    ssl_dhparam /etc/ssl/certs/dhparam.pem;

    #add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
     add_header Strict-Transport-Security "max-age=31536000" always;
    location / {
        try_files $uri $uri/ /index.php?q=$uri&$args;

    location ~ \.php$ {
        include /etc/nginx/fastcgi_params;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;

    location ~*  \.(jpg|jpeg|png|svg|gif|woff|woff2|ico|css|js)$ {
        expires 365d;

    location ~*  \.(pdf)$ {
        expires 30d;

    location = /favicon.ico {
        log_not_found off;
        access_log off;

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;

    location ~* /(?:uploads|files)/.*\.php$ {
        deny all;
    location ~ /.well-known {
        allow all;

Any help is appreciated. Thanks :)

  • It looks as though the assets are linked as http://, because your site is secure (using https://) they won't be loaded for security reasons. You may want to check in Wordpress and see if you've got the correct base url (https://damir.tech).

  • Yeah, a lot is messed up, also changing base url from the command line doesn't seem to be working. I think that is the problem. I will try a different method, gonna make a second droplet and transfer wordpress it self to that droplet :)

Be the first one to answer this question.