Codoforum related discussions
URL Errors

When I enable the search engine friendly URLs the image links break, when I disable them the images start working again. I did follow your documentation on how to enable friendly links in Nginx. But images break when I try to enable them. Other than images all works fine.

My server configuration is Nginx running on Debian 7.
@avinash

When I enable the search engine friendly URLs the image links break, when I disable them the images start working again. I did follow your documentation on how to enable friendly links in Nginx. But images break when I try to enable them. Other than images all works fine. My server configuration is Nginx running on Debian 7. @avinash

Try deleteing the css cached files in codoforum/cache/css .

If that does not help, let us know exactly which images are not working.

Try deleteing the css cached files in `codoforum/cache/css` . If that does not help, let us know exactly which images are not working.

The newly uploaded images in forum posts and the already uploaded images. The profile pics and all are working

The newly uploaded images in forum posts and the already uploaded images. The profile pics and all are working

@adesh @avinash See this is the error

http://forum.worldanimeclub.com/serve/attachment&path=543d0f2c73a99.png

When upload an image they get stored in this path, such a path doesn't exist

Take a look at this forum post where i uploaded the image -> http://forum.worldanimeclub.com/forum/topic/3/is-naruto-ending-perfectly#post-4

After search friendly urls are enabled, all uploaded images except profile images are broken.
543d1233301d7.png

@adesh @avinash See this is the error http://forum.worldanimeclub.com/serve/attachment&path=543d0f2c73a99.png ```` http://forum.worldanimeclub.com/serve/attachment&path=543d0f2c73a99.png ```` When upload an image they get stored in this path, such a path doesn't exist Take a look at this forum post where i uploaded the image -> http://forum.worldanimeclub.com/forum/topic/3/is-naruto-ending-perfectly#post-4 After search friendly urls are enabled, all uploaded images except profile images are broken. ![543d1233301d7.png](serve/attachment&path=543d1233301d7.png)

Hmm, guys, if possible, please fix this image error along with the Hybrid-login errors I mentioned here: http://codologic.com/forum/index.php?u=/forum/topic/1310/login-issues-and-other-problems
in the upcoming version 2.4 (which will be releasing in 8 hours from now, I guess). Right now social login sometimes works, sometimes returns fatal errors in the case of Google and twitter.

Hmm, guys, if possible, please fix this image error along with the Hybrid-login errors I mentioned here: http://codologic.com/forum/index.php?u=/forum/topic/1310/login-issues-and-other-problems in the upcoming version 2.4 (which will be releasing in 8 hours from now, I guess). Right now social login sometimes works, sometimes returns fatal errors in the case of Google and twitter.
server {
    listen 0.0.0.0:80;
    root /home/community/codoforum;
    server_name forum.worldanimeclub.com ;
    server_name_in_redirect off;
      location / {

        try_files $uri $uri/ @rewrite;
    }
    location @rewrite {
        rewrite ^/(.*)$ /index.php?uri=$1&$args;
    }


   error_page 404 /404.html;

        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
              root /usr/share/nginx/www;
        }

    index index.html index.php;
    include /etc/nginx/include/php; 

    if (!-e $request_filename) {
        rewrite /wp-admin$ $scheme://$host$uri/ permanent;     
        rewrite ^(/[^/]+)?(/wp-.*) $2 last;                    
        rewrite ^(/[^/]+)?(/.*\.php) $2 last;
    }



    #use gzip
    gzip on;
    gzip_disable "msie6";
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript/ image/png image/gif image/jpeg;


    # Don't cache uris containing the following segments
        if ($request_uri ~* "(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail)\.php|wp-.*\.php|index\.php|wp\-comments\-popup\.php|wp\-links\-opml\.php|wp\-locations\.php)") {
          set $cache_uri "no cache";
     }
    # Don't use the cache for logged in users or recent commenters
       if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp\-postpass|wordpress_logged_in") {
          set $cache_uri 'no cache';
       }
    # Cache static files for as long as possible
          location ~* \.(xml|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
          expires max;
          access_log off;
         }
     # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        location ~ \.php$ {
                try_files $uri =404;
                #fastcgi_pass 127.0.0.1:9000;
                # With php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
                 }    

}

Here is my nginx virtual block configuration for codoforum @adesh

```` server { listen 0.0.0.0:80; root /home/community/codoforum; server_name forum.worldanimeclub.com ; server_name_in_redirect off; location / { try_files $uri $uri/ @rewrite; } location @rewrite { rewrite ^/(.*)$ /index.php?uri=$1&$args; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/www; } index index.html index.php; include /etc/nginx/include/php; if (!-e $request_filename) { rewrite /wp-admin$ $scheme://$host$uri/ permanent; rewrite ^(/[^/]+)?(/wp-.*) $2 last; rewrite ^(/[^/]+)?(/.*\.php) $2 last; } #use gzip gzip on; gzip_disable "msie6"; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript/ image/png image/gif image/jpeg; # Don't cache uris containing the following segments if ($request_uri ~* "(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail)\.php|wp-.*\.php|index\.php|wp\-comments\-popup\.php|wp\-links\-opml\.php|wp\-locations\.php)") { set $cache_uri "no cache"; } # Don't use the cache for logged in users or recent commenters if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp\-postpass|wordpress_logged_in") { set $cache_uri 'no cache'; } # Cache static files for as long as possible location ~* \.(xml|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { expires max; access_log off; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { try_files $uri =404; #fastcgi_pass 127.0.0.1:9000; # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } } ```` Here is my nginx virtual block configuration for codoforum @adesh

Modified Nginx rules which works BUT breaks the admin area:

server {
    listen 0.0.0.0:80;
    root /home/community/codoforum;
    server_name forum.worldanimeclub.com;

    rewrite ^/(.*)$ /index.php?uri=$1&$args;



   error_page 404 /404.html;

        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
              root /usr/share/nginx/www;
        }

    index index.html index.php;
    include /etc/nginx/include/php; 


    #use gzip
    gzip on;
    gzip_disable "msie6";
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript/ image/png image/gif image/jpeg;


    # Cache static files for as long as possible
          location ~* \.(xml|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
          expires max;
          access_log off;
         }
     # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        location ~ \.php$ {
                try_files $uri =404;
                #fastcgi_pass 127.0.0.1:9000;
                # With php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
                 }    

}
Modified Nginx rules which works BUT breaks the admin area: ```` server { listen 0.0.0.0:80; root /home/community/codoforum; server_name forum.worldanimeclub.com; rewrite ^/(.*)$ /index.php?uri=$1&$args; error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/www; } index index.html index.php; include /etc/nginx/include/php; #use gzip gzip on; gzip_disable "msie6"; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript/ image/png image/gif image/jpeg; # Cache static files for as long as possible location ~* \.(xml|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { expires max; access_log off; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { try_files $uri =404; #fastcgi_pass 127.0.0.1:9000; # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } } ````

Can you see if it works with Codoforum V2.4 ?

Can you see if it works with Codoforum V2.4 ?
Necessity is the mother of all inventions!

Nope, it does not work. I reverted back to non sef links.

Nope, it does not work. I reverted back to non sef links.
413
8
0
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft