Nginx -- static file serving confusion with root & alias - Stack Overflow (https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196) (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (Stack Overflow) (/opensearch.xml) (https://stackoverflow.com/questions/10631933/nginx-static-file-serving-confusion-with-root-alias) (https://cdn.sstatic.net/Shared/stacks.css?v=d6a266655a25) (https://cdn.sstatic.net/Sites/stackoverflow/primary.css?v=22fb2cb11723) (Feed for question 'Nginx -- static file serving confusion with root & alias') (/feeds/question/10631933) (https://cdn.sstatic.net/Shared/Channels/channels.css?v=5981bb1a5bd7) (https://accounts.google.com/gsi/style) (site logo) Join Stack Overflow By clicking “Sign up”, you agree to our (/legal/terms-of-service/public) terms of service and acknowledge you have read our (/legal/privacy-policy) privacy policy . (59e99b481907aca79504282706e4b1db65c79b5bb11a4cbc1d88997106647265) (1) (2.0) Sign up with Google Sign up with GitHub OR (59e99b481907aca79504282706e4b1db65c79b5bb11a4cbc1d88997106647265) (1) () () () () () () Email Password (8+ characters (at least 1 letter & 1 number)) Sign up Already have an account? (/users/login) Log in (59e99b481907aca79504282706e4b1db65c79b5bb11a4cbc1d88997106647265) () Skip to main content (https://stackoverflow.com) Stack Overflow (https://stackoverflow.co/) About Products (https://stackoverflow.co/teams/ai/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav-bar&utm_content=overflowai) OverflowAI (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=stack-overflow-for-teams) Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers (https://stackoverflow.co/advertising/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=stack-overflow-advertising) Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand (https://stackoverflow.co/teams/ai/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=overflow-ai) OverflowAI GenAI features for Teams (https://stackoverflow.co/api-solutions/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=overflow-api) OverflowAPI Train & fine-tune LLMs (https://stackoverflow.co/labs/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=labs) Labs The future of collective knowledge sharing (https://stackoverflow.co/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=about-the-company) About the company (https://stackoverflow.blog/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=blog) Visit the blog (Search…) () Loading… (https://stackoverflow.com) current community (https://stackoverflow.com) (Stack Overflow) Stack Overflow (https://stackoverflow.com/help) help (https://chat.stackoverflow.com/?tab=site&host=stackoverflow.com) chat (https://meta.stackoverflow.com) (Meta Stack Overflow) Meta Stack Overflow your communities (https://stackoverflow.com/users/signup?ssrc=site_switcher&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f10631933%2fnginx-static-file-serving-confusion-with-root-alias) Sign up or (https://stackoverflow.com/users/login?ssrc=site_switcher&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f10631933%2fnginx-static-file-serving-confusion-with-root-alias) log in to customize your list. (https://stackexchange.com/sites) more stack exchange communities (https://stackoverflow.blog) company blog (Click to show search) (https://stackoverflow.com/users/login?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f10631933%2fnginx-static-file-serving-confusion-with-root-alias) Log in (https://stackoverflow.com/users/signup?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f10631933%2fnginx-static-file-serving-confusion-with-root-alias) Sign up Let's set up your homepage Select a few topics you're interested in: python javascript c# reactjs java android html flutter c++ node.js typescript css r php angular next.js spring-boot machine-learning sql excel ios azure docker Or search from our full list: (Search) javascript python java c# php android html jquery c++ css ios sql mysql r reactjs node.js arrays c asp.net json python-3.x .net ruby-on-rails sql-server swift django angular objective-c excel pandas angularjs regex typescript ruby linux ajax iphone vba xml laravel spring asp.net-mvc database wordpress string flutter postgresql mongodb wpf windows amazon-web-services xcode bash git oracle-database spring-boot dataframe azure firebase list multithreading docker vb.net react-native eclipse algorithm powershell macos visual-studio numpy image forms scala function vue.js performance twitter-bootstrap selenium winforms kotlin loops express dart hibernate sqlite matlab python-2.7 shell rest apache entity-framework android-studio csv maven api linq qt dictionary unit-testing asp.net-core facebook tensorflow apache-spark file swing class unity-game-engine sorting date authentication go symfony t-sql opencv matplotlib .htaccess google-chrome for-loop datetime codeigniter http perl validation sockets google-maps object uitableview xaml oop if-statement visual-studio-code cordova ubuntu web-services email android-layout github spring-mvc elasticsearch kubernetes selenium-webdriver ms-access user-interface parsing ggplot2 pointers google-sheets machine-learning c++11 security google-apps-script flask ruby-on-rails-3 templates nginx variables exception sql-server-2008 gradle debugging tkinter listview delphi jpa asynchronous pdf web-scraping haskell jsp ssl amazon-s3 google-cloud-platform jenkins testing xamarin wcf npm batch-file generics ionic-framework network-programming unix recursion google-app-engine mongoose visual-studio-2010 .net-core android-fragments assembly animation math next.js session svg hadoop intellij-idea curl django-models join rust winapi laravel-5 url heroku http-redirect tomcat google-cloud-firestore inheritance webpack keras image-processing gcc asp.net-mvc-4 logging dom web swiftui matrix pyspark actionscript-3 button post optimization firebase-realtime-database jquery-ui iis cocoa xpath d3.js javafx firefox internet-explorer xslt caching select asp.net-mvc-3 opengl events asp.net-web-api plot dplyr magento encryption search stored-procedures amazon-ec2 ruby-on-rails-4 memory audio canvas multidimensional-array jsf random vector cookies redux input facebook-graph-api flash xamarin.forms indexing arraylist ipad cocoa-touch data-structures video apache-kafka model-view-controller serialization jdbc woocommerce azure-devops routes razor awk servlets mod-rewrite beautifulsoup docker-compose excel-formula filter iframe aws-lambda design-patterns text django-rest-framework visual-c++ cakephp mobile android-intent react-hooks struct methods groovy mvvm ssh lambda checkbox ecmascript-6 google-chrome-extension time grails installation sharepoint cmake shiny spring-security jakarta-ee android-recyclerview plsql core-data types meteor android-activity sed bootstrap-4 websocket activerecord graph replace scikit-learn file-upload group-by vim junit boost deep-learning import sass memory-management error-handling async-await eloquent dynamic soap silverlight dependency-injection charts layout apache-spark-sql deployment browser gridview svn while-loop google-bigquery vuejs2 ffmpeg dll highcharts view foreach plugins makefile c#-4.0 redis reporting-services jupyter-notebook merge server unicode https reflection google-maps-api-3 twitter oauth-2.0 extjs pytorch axios terminal pip split mysqli cmd encoding django-views automation database-design collections hash netbeans build data-binding ember.js tcp sqlalchemy pdo apache-flex concurrency entity-framework-core command-line spring-data-jpa printing react-redux java-8 jestjs service html-table lua neo4j ansible material-ui parameters module enums visual-studio-2012 flexbox promise outlook webview firebase-authentication web-applications uwp jquery-mobile utf-8 datatable python-requests parallel-processing drop-down-menu colors scroll hive scipy tfs count syntax ms-word twitter-bootstrap-3 ssis google-analytics fonts three.js powerbi rxjs constructor graphql file-io paypal discord cassandra socket.io graphics compiler-errors gwt react-router nlp solr url-rewriting backbone.js memory-leaks datatables oauth terraform datagridview drupal oracle11g zend-framework neural-network knockout.js triggers django-forms interface angular-material google-api casting jmeter linked-list path proxy timer django-templates arduino orm directory visual-studio-2015 parse-platform windows-phone-7 cron push-notification conditional-statements primefaces functional-programming pagination model jar xamarin.android hyperlink uiview gitlab visual-studio-2013 vbscript google-cloud-functions azure-active-directory jwt download swift3 sql-server-2005 configuration process pygame rspec properties combobox callback windows-phone-8 linux-kernel safari permissions scrapy raspberry-pi scripting emacs clojure x86 scope io compilation mongodb-query nhibernate responsive-design expo angularjs-directive azure-functions request bluetooth dns 3d binding reference discord.js architecture playframework pyqt version-control doctrine-orm package get sql-server-2012 rubygems f# autocomplete openssl datepicker kendo-ui tree jackson pycharm controller yii nested grep xamarin.ios static dockerfile statistics transactions datagrid null active-directory uiviewcontroller webforms phpmyadmin discord.py notifications computer-vision sas duplicates mocking youtube nullpointerexception yaml menu sum bitmap blazor asp.net-mvc-5 electron visual-studio-2008 time-series yii2 jsf-2 css-selectors stl android-listview floating-point cryptography ant stream hashmap character-encoding msbuild sdk asp.net-core-mvc google-drive-api selenium-chromedriver jboss joomla cors navigation devise anaconda background camera multiprocessing pyqt5 binary cuda frontend linq-to-sql iterator mariadb onclick plotly ios7 rabbitmq android-jetpack-compose android-asynctask microsoft-graph-api tabs insert laravel-4 uicollectionview environment-variables amazon-dynamodb linker console xsd coldfusion upload continuous-integration ftp textview opengl-es operating-system vuejs3 mockito localization macros formatting xml-parsing json.net kivy type-conversion data.table timestamp calendar integer segmentation-fault android-ndk drag-and-drop prolog char crash jasmine automated-tests dependencies geometry android-gradle-plugin itext firebase-cloud-messaging header fortran sprite-kit mfc attributes nuxt.js nosql format azure-pipelines nestjs odoo db2 jquery-plugins jenkins-pipeline leaflet event-handling flutter-layout julia postman annotations keyboard textbox arm visual-studio-2017 gulp libgdx stripe-payments xampp synchronization crystal-reports timezone dom-events uikit azure-web-app-service android-emulator swagger wso2 sequelize.js namespaces aggregation-framework uiscrollview jvm google-sheets-formula chart.js com subprocess geolocation centos webdriver snowflake-cloud-data-platform html5-canvas garbage-collection widget dialog numbers concatenation sql-update qml set windows-10 tuples mapreduce smtp java-stream ionic2 rotation modal-dialog spring-data android-edittext http-headers nuget doctrine radio-button sonarqube grid lucene xmlhttprequest internationalization listbox initialization switch-statement components google-play apache-camel boolean serial-port ldap ios5 youtube-api return gdb pivot latex eclipse-plugin frameworks tags containers github-actions dataset asp-classic label foreign-keys subquery c++17 copy uinavigationcontroller delegates google-cloud-storage migration struts2 base64 protractor sql-server-2008-r2 find embedded queue uibutton arguments composer-php append jaxb zip stack cucumber autolayout ide entity-framework-6 popup iteration airflow tailwind-css windows-7 r-markdown ssl-certificate vb6 gmail hover jqgrid g++ udp Next You’ll be prompted to create an account to view your personalized homepage. (/) Home (/questions) Questions (/tags) Tags (/beta/discussions) Discussions Labs (https://chat.stackoverflow.com/?tab=all&sort=active) Chat (/users) Users (/jobs?source=so-left-nav) Jobs (https://stackoverflow.com/jobs/companies?so_medium=stackoverflow&so_source=SiteNav) Companies Collectives Communities for your favorite technologies. (/collectives-all) Explore all Collectives Teams () Ask questions, find answers and collaborate at work with Stack Overflow for Teams. (https://stackoverflowteams.com/teams/create/free/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams) Try Teams for free (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams) Explore Teams Teams Ask questions, find answers and collaborate at work with Stack Overflow for Teams. (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams-compact) Explore Teams Collectives™ on Stack Overflow Find centralized, trusted content and collaborate around the technologies you use most. (/collectives) Learn more about Collectives Teams Q&A for work Connect and share knowledge within a single location that is structured and easy to search. (https://stackoverflow.co/teams/) Learn more about Teams (Illustration of upvote icon after it is clicked) Hang on, you can't upvote just yet. You'll need to complete a few actions and gain 15 reputation points before being able to upvote. Upvoting indicates when questions and answers are useful. (https://stackoverflow.com/help/whats-reputation) What's reputation and how do I get it? Instead, you can save this post to reference later. Save this post for later Not now (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (/questions/10631933/nginx-static-file-serving-confusion-with-root-alias) Nginx -- static file serving confusion with root & alias (/questions/ask) Ask Question (2012-05-17 08:03:01Z) Asked 12 years, 10 months ago Modified (?lastactivity) (2022-08-02 20:19:08Z) 2 years, 8 months ago (Viewed 457,381 times) Viewed 457k times This question shows research effort; it is useful and clear (70:3:31e,16:e9c7da29bef45715,10:1743969392,16:20fbeb05d2faa98c,8:10631933,745e3321e134994775e53636bedc51e20af2cd0b5bad5f652d01ad1b9adaa36c) 668 (This question does not show any research effort; it is unclear or not useful) (70:3:31e,16:b1e83632d4a70f17,10:1743969392,16:0f3133bf1a2b6e2c,8:10631933,98b3840ed0e59600cc80bf17b09ff1ca7e006a9634c23f0b8a51d0436babd75f) Save this question. (/posts/10631933/timeline) Show activity on this post. I need to serve my app through my app server at 8080 , and my static files from a directory without touching the app server. # app server on port 8080 # nginx listens on port 8123 server { listen 8123; access_log off; location /static/ { # root /var/www/app/static/; alias /var/www/app/static/; autoindex off; } location / { proxy_pass http://127.0.0.1:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } Now, with this config, everything is working fine. Note that the root directive is commented out. If I activate root and deactivate the alias , it stops working. However, when I remove the trailing /static/ from root , it starts working again. Can someone explain what's going on? (/questions/tagged/nginx) (show questions tagged 'nginx') nginx (/q/10631933) (Short permalink to this question) Share Share a link to this question Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/10631933/edit) () Improve this question Follow (70:3:31e,16:211622cdd76884cb,10:1743969392,16:aaf0bdee8015a85a,8:10631933,ad42e2c50d69381c1b0a2b4d10ba073466a6631ba81b57829912c62c802d19bc) Follow this question to receive notifications (/posts/10631933/revisions) (show all edits to this post) edited (2022-08-02 20:19:08Z) Aug 2, 2022 at 20:19 treecoder asked (2012-05-17 08:03:01Z) May 17, 2012 at 8:03 (/users/1206051/treecoder) (treecoder's user avatar) (/users/1206051/treecoder) treecoder treecoder (reputation score 45,251) 45.3k (23 gold badges) 23 23 gold badges (70 silver badges) 70 70 silver badges (96 bronze badges) 96 96 bronze badges 0 (Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.) Add a comment | (Expand to show all comments on this post) 8 Answers 8 Sorted by: (/questions/10631933/nginx-static-file-serving-confusion-with-root-alias?answertab=scoredesc#tab-top) Reset to default (scoredesc) Highest score (default) (trending) Trending (recent votes count more) (modifieddesc) Date modified (newest first) (createdasc) Date created (oldest first) This answer is useful (70:3:31e,16:0bcf788a309f1452,10:1743969392,16:c224ad605065a004,8:10647080,4137cd1495825bf80a77a469f7184a19c88fe0fafd24cefdd97a56b63838bfc5) 1482 (This answer is not useful) (70:3:31e,16:9d65f4487bcb30b7,10:1743969392,16:ca79853cd3e96810,8:10647080,99c6f07d6cf75060fee71bf794e276d82567884e49f21aa6cd0c18460ed39840) Save this answer. (Loading when this answer was accepted…) (/posts/10647080/timeline) Show activity on this post. There is a very important difference between the root and the alias directives. This difference exists in the way the path specified in the root or the alias is processed. root the location part is appended to root part final path = root + location alias the location part is replaced by the alias part final path = alias To illustrate: Let's say we have the config location /static/ { root /var/www/app/static/; autoindex off; } In this case the final path that Nginx will derive will be /var/www/app/static/static This is going to return 404 since there is no static/ within static/ This is because the location part is appended to the path specified in the root . Hence, with root , the correct way is location /static/ { root /var/www/app/; autoindex off; } On the other hand, with alias , the location part gets dropped . So for the config location /static/ { alias /var/www/app/static/; autoindex off; ↑ } | pay attention to this trailing slash the final path will correctly be formed as /var/www/app/static In a way this makes sense. The alias just lets you define a new path to represent an existing "real" path. The location part is that new path, and so it gets replaced with the real path. Think of it as a symlink. Root, on the other hand is not a new path, it contains some information that has to be collated with some other info to make the final path. And so, the location part is used, not dropped. The case for trailing slash in alias There is no definitive guideline about whether a trailing slash is mandatory per (https://nginx.org/en/docs/http/ngx_http_core_module.html#alias) Nginx documentation , but a common observation by people here and elsewhere seems to indicate that it is. A few more places have discussed this, not conclusively though. (https://serverfault.com/questions/376162/how-can-i-create-a-location-in-nginx-that-works-with-and-without-a-trailing-slas) https://serverfault.com/questions/376162/how-can-i-create-a-location-in-nginx-that-works-with-and-without-a-trailing-slas (https://serverfault.com/questions/375602/why-is-my-nginx-alias-not-working) https://serverfault.com/questions/375602/why-is-my-nginx-alias-not-working (/a/10647080) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/10647080/edit) () Improve this answer Follow (70:3:31e,16:235bed824ba5d8e2,10:1743969392,16:bfd06cb5431c5a9f,8:10647080,353c50fec30bd23b01b032d950a4b6581f003729359968673a0608dd112e7700) Follow this answer to receive notifications (/posts/10647080/revisions) (show all edits to this post) edited (2022-07-29 23:55:22Z) Jul 29, 2022 at 23:55 answered (2012-05-18 05:18:29Z) May 18, 2012 at 5:18 (/users/1206051/treecoder) (treecoder's user avatar) (/users/1206051/treecoder) treecoder treecoder (reputation score 45,251) 45.3k (23 gold badges) 23 23 gold badges (70 silver badges) 70 70 silver badges (96 bronze badges) 96 96 bronze badges 8 (number of 'useful comment' votes received) 161 The trailing slash on the alias path is essential! – (/users/425050/mafrosis) (2,780 reputation) mafrosis Commented (2015-12-16 07:30:29Z, License: CC BY-SA 3.0) Dec 16, 2015 at 7:30 (number of 'useful comment' votes received) 10 This is all great (it helped me fix my config issues), but I wonder what logging settings people could use to help diagnose these kinds of problems? Like, anything that would print to logs stuff like "received request for [...], matched by "location [...]" config block, searching directory [...]" – (/users/28558/pistos) (23,842 reputation) Pistos Commented (2018-06-05 17:18:02Z, License: CC BY-SA 4.0) Jun 5, 2018 at 17:18 (number of 'useful comment' votes received) 8 @Pistos: put log_format scripts '$document_root | $uri | > $request'; into http section and access_log /var/log/nginx/scripts.log scripts; into server section of nginx config.. – (/users/2915423/helvete) (2,683 reputation) helvete Commented (2018-06-06 13:24:57Z, License: CC BY-SA 4.0) Jun 6, 2018 at 13:24 (number of 'useful comment' votes received) 1 Thanks! Indeed the trailing slash is essential on the alias, otherwise i got nginx: [emerg] invalid number of arguments in "alias" directive , and the server went down during its restart. – (/users/3144552/fotisk) (157 reputation) FotisK Commented (2018-07-18 21:36:42Z, License: CC BY-SA 4.0) Jul 18, 2018 at 21:36 @mafrosis Why is it essential? – (/users/1239295/bruce-sun) (661 reputation) Bruce Sun Commented (2020-02-25 02:17:40Z, License: CC BY-SA 4.0) Feb 25, 2020 at 2:17 (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) | (Expand to show all comments on this post) Show 3 more comments This answer is useful (70:3:31e,16:de48ddf84eea63b6,10:1743969392,16:12a7774c43ab14bd,8:39939584,de7e1478f9e38a645809ef1a9bae586977d59196b2218ebf711c23d5664f6964) 163 (This answer is not useful) (70:3:31e,16:28c8b78ae139884b,10:1743969392,16:0d08d0e7a313595e,8:39939584,86e4f6aa1415e321eb8b8841c876b9afcf55b506c29b7bd3c002a3ac53af0784) Save this answer. (Loading when this answer was accepted…) (/posts/39939584/timeline) Show activity on this post. as say as @treecoder In case of the root directive, full path is appended to the root including the location part, whereas in case of the alias directive, only the portion of the path NOT including the location part is appended to the alias. A picture is worth a thousand words for root : (https://i.sstatic.net/vCgqh.png) (enter image description here) for alias : (https://i.sstatic.net/Oahx0.png) (enter image description here) (/a/39939584) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/3.0/) (The current license for this post: CC BY-SA 3.0) CC BY-SA 3.0 (/posts/39939584/edit) () Improve this answer Follow (70:3:31e,16:b60255eec8775d90,10:1743969392,16:bc75c89ea05a3eef,8:39939584,9fdd459507cea6b146ebe92ab30e65dcad802bae8fd5dbdc62de02a8838dc70b) Follow this answer to receive notifications (/posts/39939584/revisions) (show all edits to this post) edited (2017-06-14 17:41:37Z) Jun 14, 2017 at 17:41 (/users/17027/mahmoud-al-qudsi) (Mahmoud Al-Qudsi's user avatar) (/users/17027/mahmoud-al-qudsi) Mahmoud Al-Qudsi (reputation score 29,639) 29.6k (13 gold badges) 13 13 gold badges (92 silver badges) 92 92 silver badges (128 bronze badges) 128 128 bronze badges answered (2016-10-09 03:03:54Z) Oct 9, 2016 at 3:03 (/users/1392860/liuzhijun) (liuzhijun's user avatar) (/users/1392860/liuzhijun) liuzhijun liuzhijun (reputation score) 4,479 (3 gold badges) 3 3 gold badges (25 silver badges) 25 25 silver badges (28 bronze badges) 28 28 bronze badges 2 (number of 'useful comment' votes received) 35 Should the first arrow in the second image be a "+"? – (/users/276052/aioobe) (421,540 reputation) aioobe Commented (2017-10-21 09:32:06Z, License: CC BY-SA 3.0) Oct 21, 2017 at 9:32 (number of 'useful comment' votes received) 6 A picture is worth 0 words if it isn't made accessible for users with visual impairments – (/users/1255289/miken32) (42,744 reputation) miken32 Commented (2023-07-05 19:08:38Z, License: CC BY-SA 4.0) Jul 5, 2023 at 19:08 (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:1c26c6df31e28fec,10:1743969392,16:b208155c86801a9f,8:31153624,0788a68a4ee0b1c8b809b4b26e4077113605fa20664e2ffb4f920a250dc00041) 45 (This answer is not useful) (70:3:31e,16:f6337e18ad6d4aa2,10:1743969392,16:a7834c04096d4e91,8:31153624,f57164152ec7ebf78b87da26ab4ce7703283f6b86b70237ace2fb1b5cb8ddcc6) Save this answer. (Loading when this answer was accepted…) (/posts/31153624/timeline) Show activity on this post. In your case, you can use root directive, because $uri part of the location directive is the same with last root directive part. (http://nginx.org/en/docs/http/ngx_http_core_module.html#alias) Nginx documentation advices it as well:When location matches the last part of the directive’s value: location /images/ { alias /data/w3/images/; } it is better to use the root directive instead: location /images/ { root /data/w3; } and root directive will append $uri to the path. (/a/31153624) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/3.0/) (The current license for this post: CC BY-SA 3.0) CC BY-SA 3.0 (/posts/31153624/edit) () Improve this answer Follow (70:3:31e,16:d907d2ec6d8676b4,10:1743969392,16:10ccccff1588e299,8:31153624,a25d68be1bd21052b5bdf4be7bc9a09932a0dab49d5682e4f2982caf1fbd0b1b) Follow this answer to receive notifications (/posts/31153624/revisions) (show all edits to this post) edited (2017-10-21 09:51:53Z) Oct 21, 2017 at 9:51 (/users/276052/aioobe) (aioobe's user avatar) (/users/276052/aioobe) aioobe (reputation score 421,540) 422k (114 gold badges) 114 114 gold badges (829 silver badges) 829 829 silver badges (840 bronze badges) 840 840 bronze badges answered (2015-07-01 06:03:02Z) Jul 1, 2015 at 6:03 (/users/4091526/antonbormotov) (antonbormotov's user avatar) (/users/4091526/antonbormotov) antonbormotov antonbormotov (reputation score) 1,987 (2 gold badges) 2 2 gold badges (21 silver badges) 21 21 silver badges (33 bronze badges) 33 33 bronze badges 2 (number of 'useful comment' votes received) 5 Why is it better? Docs don't say either. – (/users/336694/hostedmetrics-com) (3,805 reputation) HostedMetrics.com Commented (2017-12-26 17:35:47Z, License: CC BY-SA 3.0) Dec 26, 2017 at 17:35 (number of 'useful comment' votes received) 2 The benefit that I see is to avoid duplication of the $uri, /images in given example, when using alias – (/users/4091526/antonbormotov) (1,987 reputation) antonbormotov Commented (2017-12-26 17:42:16Z, License: CC BY-SA 3.0) Dec 26, 2017 at 17:42 (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:7afe7d7c7af43fd9,10:1743969392,16:bc710be61f2a2ddf,8:26204797,9f55e42cc51a14ead15a74d36d934251864d5a1a545b22f1fd9ba8d04ef9d432) 27 (This answer is not useful) (70:3:31e,16:c08af2087d796da4,10:1743969392,16:18ee98a3b302cb41,8:26204797,754d1fc5cab9811963a557e372689ac4f6682a0d6f8368d71fce10b7793c0950) Save this answer. (Loading when this answer was accepted…) (/posts/26204797/timeline) Show activity on this post. Just a quick addendum to @good_computer's very helpful answer, I wanted to replace to root of the URL with a folder, but only if it matched a subfolder containing static files (which I wanted to retain as part of the path). For example if file requested is in /app/js or /app/css , look in /app/location/public/[that folder] . I got this to work using a regex. location ~ ^/app/((images/|stylesheets/|javascripts/).*)$ { alias /home/user/sites/app/public/$1; access_log off; expires max; } (/a/26204797) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/3.0/) (The current license for this post: CC BY-SA 3.0) CC BY-SA 3.0 (/posts/26204797/edit) () Improve this answer Follow (70:3:31e,16:d3da4190fb7f2594,10:1743969392,16:49afcbd057790dbc,8:26204797,59d8777266838cda081c81d4432b5bdbd1369df6c7d4b7c45b41d05d5e5854ff) Follow this answer to receive notifications answered (2014-10-05 16:38:31Z) Oct 5, 2014 at 16:38 (/users/648802/meloncholy) (meloncholy's user avatar) (/users/648802/meloncholy) meloncholy meloncholy (reputation score) 2,192 (19 silver badges) 19 19 silver badges (16 bronze badges) 16 16 bronze badges 4 (number of 'useful comment' votes received) 4 Thanks for this answer. I know this is 3 years later, but could anyone explain if there is a performance and/or security tradeoff between using alias versus root? – (/users/805405/mina) (757 reputation) Mina Commented (2017-05-28 15:33:17Z, License: CC BY-SA 3.0) May 28, 2017 at 15:33 (number of 'useful comment' votes received) 4 @Mina It's better to use root if you can. (There's a comment in the docs (http://wiki.nginx.org/HttpCoreModule#alias) wiki.nginx.org/HttpCoreModule#alias ) – (/users/266375/matthew-wilcoxson) (3,622 reputation) Matthew Wilcoxson Commented (2018-08-16 17:35:59Z, License: CC BY-SA 4.0) Aug 16, 2018 at 17:35 This is exactly what I came here for 👍👏 – (/users/1235402/alienfromouterspace) (267 reputation) alienfromouterspace Commented (2019-07-07 06:17:52Z, License: CC BY-SA 4.0) Jul 7, 2019 at 6:17 (number of 'useful comment' votes received) 1 Both are safe, but be careful when using alias with location that doesn't end with / It is a vulnerability (https://github.com/yandex/gixy/blob/master/docs/en/plugins/aliastraversal.md) github.com/yandex/gixy/blob/master/docs/en/plugins/… – (/users/3886123/eduardo) (97 reputation) Eduardo Commented (2021-09-23 18:49:13Z, License: CC BY-SA 4.0) Sep 23, 2021 at 18:49 (this comment was edited 1 time) (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:e333fcdd1887aeac,10:1743969392,16:dd1a3b9a290b07af,8:56303573,1357bf6d66816c6492caeb2c45bcce11fa678a7965eeba1aa56078970f598713) 10 (This answer is not useful) (70:3:31e,16:56f28e9964ec8fd7,10:1743969392,16:fee07ea55f842a06,8:56303573,ecab0e12f8f075a3c915759dbf76153103c7a431d3afc46d521189182c413939) Save this answer. (Loading when this answer was accepted…) (/posts/56303573/timeline) Show activity on this post. alias is used to replace the location part path (LPP) in the request path, while the root is used to be prepended to the request path. They are two ways to map the request path to the final file path. alias could only be used in location block, and it will override the outside root . alias and root cannot be used in location block together. (/a/56303573) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/56303573/edit) () Improve this answer Follow (70:3:31e,16:1ab65ad941156fcf,10:1743969392,16:184d3f051879b66d,8:56303573,6171f86f08d24459de1c11ae21ad6007cf56cfa02cd3d5908965f8d82e2e7f38) Follow this answer to receive notifications (/posts/56303573/revisions) (show all edits to this post) edited (2019-05-25 09:47:52Z) May 25, 2019 at 9:47 answered (2019-05-25 09:33:02Z) May 25, 2019 at 9:33 (/users/3371998/yao-zhao) (Yao Zhao's user avatar) (/users/3371998/yao-zhao) Yao Zhao Yao Zhao (reputation score) 4,623 (4 gold badges) 4 4 gold badges (24 silver badges) 24 24 silver badges (33 bronze badges) 33 33 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:c2ca2424c505d27e,10:1743969392,16:f972586416f4e576,8:46251735,bab34d82d84324fa543494f7d59dda836114c6776090475ec632c1d4b8553086) 4 (This answer is not useful) (70:3:31e,16:a578655f46d5a8b4,10:1743969392,16:17a1ecb3e1ec3fcd,8:46251735,3c2cc46a88e1fbf8e8dfc00205f5ad4db36769c80aea1f170b3aeedf1dfce616) Save this answer. (Loading when this answer was accepted…) (/posts/46251735/timeline) Show activity on this post. server { server_name xyz.com; root /home/ubuntu/project_folder/; client_max_body_size 10M; access_log /var/log/nginx/project.access.log; error_log /var/log/nginx/project.error.log; location /static { index index.html; } location /media { alias /home/ubuntu/project/media/; } } Server block to live the static page on nginx. (/a/46251735) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/3.0/) (The current license for this post: CC BY-SA 3.0) CC BY-SA 3.0 (/posts/46251735/edit) () Improve this answer Follow (70:3:31e,16:c6672e8d85e93036,10:1743969392,16:a4ae6af807eb2e5f,8:46251735,4af693fd2539b992802185c8e6f0a22bb7a527e8157471f1b43778fb6787cf36) Follow this answer to receive notifications answered (2017-09-16 08:15:29Z) Sep 16, 2017 at 8:15 (/users/7726483/tapish) (Tapish's user avatar) (/users/7726483/tapish) Tapish Tapish (reputation score) 61 (3 bronze badges) 3 3 bronze badges 1 (number of 'useful comment' votes received) 1 Be careful when using alias with location that doesn't end with / It is a vulnerability (https://github.com/yandex/gixy/blob/master/docs/en/plugins/aliastraversal.md) github.com/yandex/gixy/blob/master/docs/en/plugins/… Files from the project directory can be revealed using /media.. on request – (/users/3886123/eduardo) (97 reputation) Eduardo Commented (2021-09-23 18:46:39Z, License: CC BY-SA 4.0) Sep 23, 2021 at 18:46 (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:07163b02ef79f3ea,10:1743969392,16:38158a279a6f1c8c,8:66930499,ec52820254d2cc88583a3f2b4f151d6c7d4b00f591392afab03a1ad706435d1a) 4 (This answer is not useful) (70:3:31e,16:902a11b168ae998e,10:1743969392,16:98a607b65f08b674,8:66930499,cc36de54703029177366b9ef996c770e09294c77871ae1ecae7c1df9ebdff705) Save this answer. (Loading when this answer was accepted…) (/posts/66930499/timeline) Show activity on this post. Though my answer is not needed, But I think It is necessary to add this, root and alias works differently when is come to regex. location ~ /static/my.png$ { alias /var/www/static/; access_log off; expires max; } In this case the regex match is not going to add with alias, nginx will search only /var/www/static/ not /var/www/static/my.png . You have to use regex capture. location ~ /static/my.png$ { root /var/www; access_log off; expires max; } In this case the matched url going to add with root, nginx will search /var/www/static/my.png . (/a/66930499) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/66930499/edit) () Improve this answer Follow (70:3:31e,16:019222fad9ef5dee,10:1743969392,16:62ca7d62ba7e1652,8:66930499,209ba78f6566cccacdcf65d4a85e6580875a2c63fdaafa8c84d1053515db4e7e) Follow this answer to receive notifications (/posts/66930499/revisions) (show all edits to this post) edited (2021-10-29 08:56:29Z) Oct 29, 2021 at 8:56 (/users/233692/jean-philippe-caruana) (Jean-Philippe Caruana's user avatar) (/users/233692/jean-philippe-caruana) Jean-Philippe Caruana (reputation score) 2,706 (4 gold badges) 4 4 gold badges (25 silver badges) 25 25 silver badges (47 bronze badges) 47 47 bronze badges answered (2021-04-03 11:13:35Z) Apr 3, 2021 at 11:13 (/users/11893899/akash-patra) (Akash Patra's user avatar) (/users/11893899/akash-patra) Akash Patra Akash Patra (reputation score) 61 (2 bronze badges) 2 2 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:0504886f5163be72,10:1743969392,16:c6df70cb5912bf83,8:56092253,a93c08a4112df57b29d0590b7608b1c8ba14214dd27704d3dc1a3e94e5e509f2) 3 (This answer is not useful) (70:3:31e,16:ba066547498d5d3c,10:1743969392,16:734dce6cbab6f02c,8:56092253,70d4f6a5e6bbc05cbe582ffbbd53a85f20fc51e5ddc2279eb1cd8512fe790550) Save this answer. (Loading when this answer was accepted…) (/posts/56092253/timeline) Show activity on this post. In other words on keeping this brief: in case of root , location argument specified is part of filesystem's path and URI . On the other hand — for alias directive argument of location statement is part of URI only So, alias is a different name that maps certain URI to certain path in the filesystem, whereas root appends location argument to the root path given as argument to root directive. (/a/56092253) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/56092253/edit) () Improve this answer Follow (70:3:31e,16:69d68d4f689c24b5,10:1743969392,16:f94d00c0e152433b,8:56092253,6e64b4153cb5a6a977edde92b1dc10c8066a3a31a9061af68af13be2b0c97639) Follow this answer to receive notifications (/posts/56092253/revisions) (show all edits to this post) edited (2019-05-11 17:22:13Z) May 11, 2019 at 17:22 answered (2019-05-11 16:29:59Z) May 11, 2019 at 16:29 user4153980user4153980 (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) (/help/privileges/protect-questions) Highly active question . Earn 10 reputation (not counting the (https://meta.stackexchange.com/questions/141648/what-is-the-association-bonus-and-how-does-it-work) association bonus ) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity. Start asking to get answers Find the answer to your question by asking. (/questions/ask) Ask question Explore related questions (/questions/tagged/nginx) (show questions tagged 'nginx') nginx See similar questions with these tags. The Overflow Blog (https://stackoverflow.blog/2025/04/03/from-training-to-inference-the-new-role-of-web-data-in-llms/?cb=1) From training to inference: The new role of web data in LLMs (https://stackoverflow.blog/2025/04/04/is-ai-a-bubble-or-a-revolution-the-answer-is-yes/?cb=1) Is AI a bubble or a revolution? The answer is yes. Featured on Meta (Meta Stack Exchange) (https://meta.stackexchange.com/questions/407927/changes-to-reporting-for-the-status-review-escalation-process?cb=1) Changes to reporting for the [status-review] escalation process (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/421831/policy-generative-ai-e-g-chatgpt-is-banned?cb=1) Policy: Generative AI (e.g., ChatGPT) is banned (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/433466/a-discussion-about-closed-and-potentially-useful-posts-on-stack-overflow?cb=1) A discussion about closed (and potentially useful) posts on Stack Overflow Linked (https://stackoverflow.com/q/61936889?lq=1) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/61936889/nginx-directory-listing-only-for-subpath?noredirect=1&lq=1) Nginx Directory Listing only for subpath (https://stackoverflow.com/q/53554695?lq=1) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/53554695/django-statics-not-accessible-digital-ocean?noredirect=1&lq=1) Django Statics not accessible (Digital Ocean) (https://stackoverflow.com/q/49889093?lq=1) (Question score (upvotes - downvotes)) 15 (https://stackoverflow.com/questions/49889093/nginx-configuration-for-angular-i18n-application?noredirect=1&lq=1) Nginx configuration for angular i18n application (https://stackoverflow.com/q/31519505?lq=1) (Question score (upvotes - downvotes)) 24 (https://stackoverflow.com/questions/31519505/how-to-setup-nginx-to-deploy-different-single-page-apps-spas-i-e-static-fil?noredirect=1&lq=1) How to setup NGINX to deploy different Single Page Apps (SPA's... i.e static files) depending on location (under same server_name) with subroutes (https://stackoverflow.com/q/33989060?lq=1) (Question score (upvotes - downvotes)) 20 (https://stackoverflow.com/questions/33989060/how-to-serve-a-directory-of-static-files-at-a-certain-location-path-with-nginx?noredirect=1&lq=1) How to serve a directory of static files at a certain location path with nginx? (https://stackoverflow.com/q/63187170?lq=1) (Question score (upvotes - downvotes)) 9 (https://stackoverflow.com/questions/63187170/nginx-and-create-react-app-with-react-router-full-routes-not-working?noredirect=1&lq=1) Nginx and Create React App (with React Router) full routes not working (https://stackoverflow.com/q/44801064?lq=1) (Question score (upvotes - downvotes)) 7 (https://stackoverflow.com/questions/44801064/nginx-error-404-when-using-autoindex?noredirect=1&lq=1) Nginx error 404 when using autoindex (https://stackoverflow.com/q/43306033?lq=1) (Question score (upvotes - downvotes)) 3 (https://stackoverflow.com/questions/43306033/django-serving-static-files-with-nginx-gives-error-404?noredirect=1&lq=1) Django, serving static files with nGinx gives error 404 (https://stackoverflow.com/q/63503093?lq=1) (Question score (upvotes - downvotes)) 2 (https://stackoverflow.com/questions/63503093/how-to-resolve-nginx-static-assets-not-found-error?noredirect=1&lq=1) how to resolve nginx static assets not found error (https://stackoverflow.com/q/70289641?lq=1) (Question score (upvotes - downvotes)) 2 (https://stackoverflow.com/questions/70289641/nginx-alias-still-points-to-and-loads-from-root-directory?noredirect=1&lq=1) Nginx alias still points to and loads from root directory (https://stackoverflow.com/questions/linked/10631933?lq=1) See more linked questions Related (https://stackoverflow.com/q/12011296?rq=3) (Question score (upvotes - downvotes)) 2 (https://stackoverflow.com/questions/12011296/nginx-isnt-serving-static-files?rq=3) Nginx Isn't Serving Static Files (https://stackoverflow.com/q/25448590?rq=3) (Question score (upvotes - downvotes)) 5 (https://stackoverflow.com/questions/25448590/configuring-nginx-to-serve-static-files-from-a-custom-directory?rq=3) configuring nginx to serve static files from a custom directory (https://stackoverflow.com/q/33672003?rq=3) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/33672003/static-files-setting-in-nginx?rq=3) Static files setting in Nginx? (https://stackoverflow.com/q/40907879?rq=3) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/40907879/nginx-alias-not-working-for-static-files-folder?rq=3) nginx alias not working for static files folder (https://stackoverflow.com/q/40976266?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/40976266/nginx-serving-static-files?rq=3) NGINX serving static files (https://stackoverflow.com/q/41538048?rq=3) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/41538048/nginx-serving-static-files-from-root-and-uploaded-files-from-alias?rq=3) nginx serving static files from root and uploaded files from alias (https://stackoverflow.com/q/50714859?rq=3) (Question score (upvotes - downvotes)) 3 (https://stackoverflow.com/questions/50714859/using-nginx-to-serve-a-static-files-in-a-subdirectory?rq=3) Using Nginx to serve a static files in a subdirectory (https://stackoverflow.com/q/55144510?rq=3) (Question score (upvotes - downvotes)) 3 (https://stackoverflow.com/questions/55144510/serving-static-website-in-nginx-wrong-path-for-static-files?rq=3) Serving static website in nginx, wrong path for static files (https://stackoverflow.com/q/67925989?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/67925989/nginx-is-not-serving-static-files-using-alias-and-root?rq=3) Nginx is not serving static files using alias and root? (https://stackoverflow.com/q/69171002?rq=3) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/69171002/nginx-serving-angular-static-files?rq=3) Nginx serving angular static files (https://stackexchange.com/questions?tab=hot) Hot Network Questions (TeX - LaTeX Stack Exchange) (https://tex.stackexchange.com/questions/740366/vertical-alignment-not-proper-in-sections-number-in-the-left-margin) Vertical alignment not proper in sections number in the left margin (Mathematics Educators Stack Exchange) (https://matheducators.stackexchange.com/questions/28574/mathematical-metaphors-in-alices-adventures) mathematical metaphors in Alice's adventures (Unix & Linux Stack Exchange) (https://unix.stackexchange.com/questions/793356/user-permissions-on-shared-files-in-dual-boot-system-windows-linux-unable-to) User permissions on shared files in dual boot system (Windows, Linux): unable to edit shared file on Linux (Law Stack Exchange) (https://law.stackexchange.com/questions/108164/who-is-responsible-for-diagnosing-issues-in-a-rental-property) Who is responsible for diagnosing issues in a rental property? (Mathematica Stack Exchange) (https://mathematica.stackexchange.com/questions/312019/mathematica-frequently-fails-to-import-seemingly-valid-json) Mathematica frequently fails to import seemingly valid JSON (Electrical Engineering Stack Exchange) (https://electronics.stackexchange.com/questions/743200/does-neutral-wire-carry-power) Does neutral wire carry power? (Philosophy Stack Exchange) (https://philosophy.stackexchange.com/questions/123989/is-there-any-tradition-to-stay-without-god-not-about-atheism) Is there any tradition to stay without God (not about atheism)? (Science Fiction & Fantasy Stack Exchange) (https://scifi.stackexchange.com/questions/295901/looking-for-sources-stating-that-the-abomination-emil-blonsky-originates-from) Looking for sources stating that the Abomination (Emil Blonsky) originates from Zagreb (Worldbuilding Stack Exchange) (https://worldbuilding.stackexchange.com/questions/265679/speciation-while-populating-a-planet-from-a-colony-ship) Speciation while populating a planet from a colony ship (Academia Stack Exchange) (https://academia.stackexchange.com/questions/217742/as-junior-faculty-i-essentially-have-to-be-sys-admin-for-my-groups-compute-ser) As junior faculty, I essentially have to be sys admin for my group's compute server. Can I negotiate to get something in exchange for this? (Academia Stack Exchange) (https://academia.stackexchange.com/questions/217773/my-former-university-is-trying-to-have-its-name-removed-from-my-papers-probably) My former university is trying to have its name removed from my papers (probably as revenge for whistleblowing). How to proceed? (Arqade) (https://gaming.stackexchange.com/questions/411753/will-switch-2-also-support-original-switch-joy-cons) Will Switch 2 also support original Switch Joy-Cons? (Network Engineering Stack Exchange) (https://networkengineering.stackexchange.com/questions/87066/correct-idea-for-an-ipsec-gateway) Correct idea for an IPsec gateway (Travel Stack Exchange) (https://travel.stackexchange.com/questions/194588/waiting-vs-boarding-while-on-the-upgrade-list) Waiting vs boarding while on the upgrade list (Stack Overflow) (https://stackoverflow.com/questions/79557242/how-do-i-create-a-new-vector-from-a-previous-vector-with-elements-in-a-specific) How do I create a new vector from a previous vector with elements in a specific order in R? (Physics Stack Exchange) (https://physics.stackexchange.com/questions/847010/what-is-the-assumption-of-instantaneous-collision-for) What is the assumption of instantaneous collision for? (Puzzling Stack Exchange) (https://puzzling.stackexchange.com/questions/131293/two-circles-and-a-pentagon) Two circles and a pentagon (Puzzling Stack Exchange) (https://puzzling.stackexchange.com/questions/131301/what-was-the-checkmating-move) What was the checkmating move? (History of Science and Mathematics Stack Exchange) (https://hsm.stackexchange.com/questions/18457/who-first-showed-the-famous-best-worst-case-complexity-on-sorting-algorithms) Who first showed the famous best worst case complexity on sorting algorithms? (Travel Stack Exchange) (https://travel.stackexchange.com/questions/194585/airside-sleeping-options-at-beijing-international-pek-terminal-2) Airside sleeping options at Beijing International (PEK) Terminal 2? (Physics Stack Exchange) (https://physics.stackexchange.com/questions/847007/intuition-for-maupertuis-action-and-the-principle-of-least-action) Intuition for Maupertuis' action and the principle of least action (Movies & TV Stack Exchange) (https://movies.stackexchange.com/questions/125029/why-not-get-rid-of-the-walkers-in-the-forests-in-the-walking-dead) Why not get rid of the walkers in the forests in The Walking Dead? (MathOverflow) (https://mathoverflow.net/questions/490492/history-of-invariant-types-in-model-theory) History of invariant types in model theory (Academia Stack Exchange) (https://academia.stackexchange.com/questions/217732/desk-reject-of-a-revised-manuscript) Desk reject of a revised manuscript? (/feeds/question/10631933) (Feed of this question and its answers) Question feed Subscribe to RSS Question feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader. (https://stackoverflow.com/feeds/question/10631933) () () () (https://stackoverflow.com) (https://stackoverflow.com) Stack Overflow (/questions) Questions (/help) Help (https://chat.stackoverflow.com/?tab=site&host=stackoverflow.com) Chat (https://stackoverflow.co/) Products (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=teams) Teams (https://stackoverflow.co/advertising/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=advertising) Advertising (https://stackoverflow.co/advertising/employer-branding/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=talent) Talent (https://stackoverflow.co/) Company (https://stackoverflow.co/) About (https://stackoverflow.co/company/press/) Press (https://stackoverflow.co/company/work-here/) Work Here (https://stackoverflow.com/legal) Legal (https://stackoverflow.com/legal/privacy-policy) Privacy Policy (https://stackoverflow.com/legal/terms-of-service/public) Terms of Service (/contact) Contact Us Your Privacy Choices (https://stackoverflow.com/legal/cookie-policy) Cookie Policy (https://stackexchange.com) Stack Exchange Network (https://stackexchange.com/sites#technology) Technology (https://stackexchange.com/sites#culturerecreation) Culture & recreation (https://stackexchange.com/sites#lifearts) Life & arts (https://stackexchange.com/sites#science) Science (https://stackexchange.com/sites#professional) Professional (https://stackexchange.com/sites#business) Business (https://api.stackexchange.com/) API (https://data.stackexchange.com/) Data (https://stackoverflow.blog?blb=1) Blog (https://www.facebook.com/officialstackoverflow/) Facebook (https://twitter.com/stackoverflow) Twitter (https://linkedin.com/company/stack-overflow) LinkedIn (https://www.instagram.com/thestackoverflow) Instagram Site design / logo © 2025 Stack Exchange Inc; user contributions licensed under (https://stackoverflow.com/help/licensing) CC BY-SA . rev 2025.4.4.24803