<div dir="ltr">Hello<br><div><br>Can you use tools like <i>strace</i> or <i>sysdig</i> to see where the time is being lost?<br><br></div><div>Greetings,<br><br></div><div>Oscar<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 31, 2014 at 12:34 AM, ASTRAPI <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us" target="_blank">nginx-forum@nginx.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
On my Nginx server i use a domain "<a href="http://domain.com" target="_blank">domain.com</a>" and i have all files here:<br>
<br>
/home/nginxs/domains/<a href="http://mydomain.com/public" target="_blank">mydomain.com/public</a><br>
<br>
<br>
There i have a folder named "gadgets" and i have some files there and i use<br>
a redirect to another domain for this folder.<br>
<br>
So if a user types <a href="http://seconddomain.com" target="_blank">seconddomain.com</a> it goes to the folder gadgets in the<br>
first domains folder and get al results.....<br>
<br>
The problem is that is very slow (first domain is loading super fast !) and<br>
then checking i found this :<br>
<br>
So Time to first byte is very slow 6 seconds :(<br>
<br>
No idea how can fix this :(<br>
<br>
And i can't move that folder to the new created account that i redirect as<br>
the files inside gadgets are interacting with other files there from main<br>
account.....<br>
<br>
second domain config:<br>
<br>
server {<br>
listen 80;<br>
server_name <a href="http://mydomain.com" target="_blank">mydomain.com</a>;<br>
return 301 $scheme://<a href="http://www.mydomain.com" target="_blank">www.mydomain.com</a>$request_uri;<br>
}<br>
server {<br>
listen 80;<br>
server_name <a href="http://blog.mydomain.com" target="_blank">blog.mydomain.com</a>;<br>
root /home/nginx/domains/firstdomain/public/blog;<br>
index index.php;<br>
access_log /var/log/nginx/blog.gogadget.gr_access.log;<br>
error_log /var/log/nginx/blog.gogadget.gr_error.log;<br>
location / {<br>
try_files $uri $uri/ /index.html /index.php?$args;<br>
}<br>
}<br>
server {<br>
listen 80;<br>
server_name <a href="http://www.mydomain.com" target="_blank">www.mydomain.com</a> <a href="http://dev.mydomain.com" target="_blank">dev.mydomain.com</a>;<br>
root /home/nginx/domains/<a href="http://firstdomain.com/public" target="_blank">firstdomain.com/public</a>;<br>
index index.php;<br>
access_log /var/log/nginx/mydomain.com_access.log;<br>
error_log /var/log/nginx/mydomain.com_error.log;<br>
location /go {<br>
return 301 <a href="http://www.mydomain.com/" target="_blank">http://www.mydomain.com/</a>;<br>
}<br>
location / {<br>
try_files $uri $uri/ /index.html /index.php?$args;<br>
}<br>
location /blog/ {<br>
deny all;<br>
}<br>
error_page 500 502 504 /500.html;<br>
location ~*<br>
^.+\.(?:css|cur|js|jpg|jpeg|gif|ico|png|html|xml|zip|rar|mp4|3gp|flv|webm|f4v|ogm)$<br>
{<br>
access_log off;<br>
expires 30d;<br>
tcp_nodelay off;<br>
open_file_cache max=3000 inactive=120s;<br>
open_file_cache_valid 45s;<br>
open_file_cache_min_uses 2;<br>
open_file_cache_errors off;<br>
}<br>
location /api2/ {<br>
rewrite ^/api2/(.*)$ /api/public/index.php?route=$1 last;<br>
}<br>
location ~* /(uploads|public)/ {<br>
access_log off;<br>
expires 30d;<br>
}<br>
location ~ /\.ht {<br>
deny all;<br>
}<br>
include /usr/local/nginx/conf/staticfiles.conf;<br>
include /usr/local/nginx/conf/php.conf;<br>
include /usr/local/nginx/conf/drop.conf;<br>
include /usr/local/nginx/conf/block.conf;<br>
#include /usr/local/nginx/conf/errorpage.conf;<br>
}<br>
<br>
Any ideas?<br>
<br>
I am using ZendOpcache and Memcached...<br>
<br>
Thanks<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,255913,255913#msg-255913" target="_blank">http://forum.nginx.org/read.php?2,255913,255913#msg-255913</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Oscar Fernandez Sierra<br><a href="mailto:oscaretu@gmail.com">oscaretu@gmail.com</a></div>
</div>