D
D
Dimonchik2015-04-29 13:16:32
Nginx
Dimonchik, 2015-04-29 13:16:32

Nginx different filenames on same server for different domains, static return?

please tell me where to look in principle:

Nginx is configured to return statics, PHP MySQL is not used on the server (you can install it), SATA HDD

in domain number one, files are given by URL as is in the file system: domain1.example.com/path/to /file_id.jpg I

want to give them SEO optimized in domain number two: at least domain2.example.com/path/to/SEO_super_filename.jpg and even
domain2.example.com/SEO_super_filename.jpg

dependencies between file_id and the file attribute "SEO_super_file" yes, stored in the database

, tell me how it is easier / more reliable to implement in order to save space (domain2.example.com rises on the same server, another IP, etc.):

the creation of symlink() looks obvious/path/to/SEO_super_filename.jpg EO_super_filename.jpg,
but maybe you can make nginx work with the database directly? and will there be a gain with a large number of files?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Avilov, 2015-04-30
@dimonchik2013

And what prevents you from running a script once that will create symlinks for all SEO files? Why torture nginx?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question