umable to add sending server

I have configured my server for nginx. everything seems to work fine. but when i add send grid api to amazon api, it displays a blank page with just "[]" which is the same if you just go to http://emailer.affluentconcierge.club/api/ that means the nginx redirect is working. the server shows up on the delivery server list but there's no way for me to verify it.

so how do i verify it?
 
pagespeed Off;
# server_name_in_redirect off;
# index index.php index.html index.htm default.html default.htm;
# Support Clean (aka Search Engine Friendly) URLs
# try_files $uri $uri/ /index.php?q=$request_uri;
# try_files $uri $uri/ /index.php?$args;

# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}
index index.php index.html index.htm default.html default.htm;
# Support Clean (aka Search Engine Friendly) URLs
# try_files $uri $uri/ /index.php?q=$request_uri;
try_files $uri $uri/ /index.php?$args;

# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}

if (!-e $request_filename){
rewrite api/.* /api/index.php;
}
if (!-e $request_filename){
rewrite customer/.* /customer/index.php;
}
if (!-e $request_filename){
rewrite backend/.* /backend/index.php;
}
if (!-e $request_filename){
rewrite ^(.*)$ /index.php;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /usr/local/apps/nginx/etc/fastcgi.conf;
fastcgi_connect_timeout 10;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 512k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 512k;
fastcgi_temp_file_write_size 512k;
fastcgi_intercept_errors on;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_keep_conn on;

fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param REDIRECT_STATUS 200;

# uncomment these for HTTPS usage
#fastcgi_param HTTPS $https if_not_empty;
#fastcgi_param SSL_PROTOCOL $ssl_protocol if_not_empty;
#fastcgi_param SSL_CIPHER $ssl_cipher if_not_empty;
#fastcgi_param SSL_SESSION_ID $ssl_session_id if_not_empty;
#fastcgi_param SSL_CLIENT_VERIFY $ssl_client_verify if_not_empty;

# caching of files
location ~* \.(ico|pdf|flv)$ {
expires 1d;
}

location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
expires 14d;
}
}
 
@Khoi Nguyen - My example from https://forum.mailwizz.com/threads/nginx-server-basic-configuration-for-mailwizz.8/ shows the rewrite rules as :
Code:
location / {
if (!-e $request_filename){
rewrite ^(/)?api/.*$ /api/index.php;
}
if (!-e $request_filename){
rewrite ^(/)?customer/.*$ /customer/index.php;
}
if (!-e $request_filename){
rewrite ^(/)?backend/.*$ /backend/index.php;
}
if (!-e $request_filename){
rewrite ^(.*)$ /index.php;
}
index index.html index.htm index.php;
}

whereas your rules are:
Code:
if (!-e $request_filename){
rewrite api/.* /api/index.php;
}
if (!-e $request_filename){
rewrite customer/.* /customer/index.php;
}
if (!-e $request_filename){
rewrite backend/.* /backend/index.php;
}
if (!-e $request_filename){
rewrite ^(.*)$ /index.php;
}

So, can you tell me why you say that you configured nginx following my advices when is clearly you haven't ?
 
@Khoi Nguyen - Yes i got that, you took it from there initially, but then i corrected you in #3 and told you to try the other configuration.
What is the reason why you skipped that ?
 
The rules from my second example are the correct ones that i always use when i need to setup mailwizz with nginx so put them back because they are correct.
If you still get same error, try to clear your browser caches and if the same, then try to disable all nginx directives that you don't see in my example till you get it right.
 
ok it semi works. amazon ses api requires you to input IAM username, smtp username and smtp password. you can't put in the IAM username so it doesn't work.
 
Back
Top