How to cofigure nginx to serve a pdf file? - 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/70824032/how-to-cofigure-nginx-to-serve-a-pdf-file) (https://cdn.sstatic.net/Shared/stacks.css?v=d6a266655a25) (https://cdn.sstatic.net/Sites/stackoverflow/primary.css?v=22fb2cb11723) (Feed for question 'How to cofigure nginx to serve a pdf file?') (/feeds/question/70824032) (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%2f70824032%2fhow-to-cofigure-nginx-to-serve-a-pdf-file) Sign up or (https://stackoverflow.com/users/login?ssrc=site_switcher&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f70824032%2fhow-to-cofigure-nginx-to-serve-a-pdf-file) 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%2f70824032%2fhow-to-cofigure-nginx-to-serve-a-pdf-file) Log in (https://stackoverflow.com/users/signup?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f70824032%2fhow-to-cofigure-nginx-to-serve-a-pdf-file) 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 (Illustration of upvote icon after it is clicked) Hang on, you can't downvote just yet. You'll need to complete a few actions and gain 125 reputation points before being able to downvote. Casting downvotes indicate issues with quality, effort, or accuracay of a post. (https://stackoverflow.com/help/whats-reputation) What's reputation and how do I get it? Instead, you can try suggesting an edit to improve the post. Suggest edit No thanks (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (/questions/70824032/how-to-cofigure-nginx-to-serve-a-pdf-file) How to cofigure nginx to serve a pdf file? (/questions/ask) Ask Question (2022-01-23 16:11:06Z) Asked 3 years, 2 months ago Modified (?lastactivity) (2022-01-23 19:20:03Z) 3 years, 2 months ago (Viewed 8,640 times) Viewed 9k times This question shows research effort; it is useful and clear (70:3:31e,16:2b7e2992a0393089,10:1743959459,16:b045a37277f55abf,8:70824032,0be61bf2ae699a9d341e20bef0513f4fd78b7cd71162a3c83f7a965d3e4b5159) 2 (This question does not show any research effort; it is unclear or not useful) (70:3:31e,16:46801a9b77eb7a5e,10:1743959459,16:53bf127514c31c07,8:70824032,71486b2f6c8f3be21a74c91618f68a7026ae275d4299152970ef5096e9c83681) Save this question. (/posts/70824032/timeline) Show activity on this post. I´m trying to serve a pdf file by making a configuration in nginx but I get the following error in the page: 404 Not Found The configuration is like this: server { listen 3002; index index.html; server_name _; location / { root /var/www/html/pdf_carpet; try_files $uri /index.html = 404; } } pdf_carpet is where the pdf file is. What could I do or change to be able to serve a pdf file in nginx? P.S. It works with html files. (/questions/tagged/nginx) (show questions tagged 'nginx') nginx (/q/70824032) (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/70824032/edit) () Improve this question Follow (70:3:31e,16:87187f4c0d5ee469,10:1743959459,16:c58a581dca7ca26c,8:70824032,0cfbd54c2affe2a22dd4e6cbd45de11fdbfa452e12a8f82911ff36b50d041d63) Follow this question to receive notifications (/posts/70824032/revisions) (show all edits to this post) edited (2022-01-23 16:17:56Z) Jan 23, 2022 at 16:17 Coder20 asked (2022-01-23 16:11:06Z) Jan 23, 2022 at 16:11 (/users/13552617/coder20) (Coder20's user avatar) (/users/13552617/coder20) Coder20 Coder20 (reputation score) 65 (1 silver badge) 1 1 silver badge (7 bronze badges) 7 7 bronze badges 5 You want to serve a single file? Check (https://stackoverflow.com/a/67628066/7121513) this answer. Change the location to location = / { ... } . – (/users/7121513/ivan-shatsky) (15,762 reputation) Ivan Shatsky Commented (2022-01-23 16:18:24Z, License: CC BY-SA 4.0) Jan 23, 2022 at 16:18 Thanks. I tried doing that but didn´t work :( Still show error. I put it like this: server { listen 3002; index index.html; server_name _; location = /pdf_carpet { alias /var/www/html/pdf_carpet/file.pdf; add_header Content-Disposition 'attachment; filename="file.pdf"'; try_files $uri /index.html = 404; } } – (/users/13552617/coder20) (65 reputation) Coder20 Commented (2022-01-23 17:07:02Z, License: CC BY-SA 4.0) Jan 23, 2022 at 17:07 (this comment was edited 1 time) Do you see a try_files directive in the answer I'm referring to? Remove it. And how are you trying to access the file? With the config you show in your last comment (without the try_files directive) your PDF file should be accessible with the http://:3002/pdf_carpet URL. – (/users/7121513/ivan-shatsky) (15,762 reputation) Ivan Shatsky Commented (2022-01-23 17:31:42Z, License: CC BY-SA 4.0) Jan 23, 2022 at 17:31 And since you are serving a PDF file, add the default_type application/pdf; directive to that location. – (/users/7121513/ivan-shatsky) (15,762 reputation) Ivan Shatsky Commented (2022-01-23 17:40:45Z, License: CC BY-SA 4.0) Jan 23, 2022 at 17:40 Now works but it downloads the file. I want to display the file in the page, not to download it. How could I do that? – (/users/13552617/coder20) (65 reputation) Coder20 Commented (2022-01-23 18:05:30Z, License: CC BY-SA 4.0) Jan 23, 2022 at 18:05 (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) 1 Answer 1 Sorted by: (/questions/70824032/how-to-cofigure-nginx-to-serve-a-pdf-file?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:4394f1143465a642,10:1743959459,16:fc789ce861ff81ca,8:70825155,6baf246c887e5d8fc85ed2f2fc5d9653cafa41c41fef1eb3bf588bd2cb5a3c67) 4 (This answer is not useful) (70:3:31e,16:afbac7c1d29daa6f,10:1743959459,16:e7e9c55e0a61fdf2,8:70825155,14bcd9f8248824a34d76ee5d24cd4fda2130c18d3899569b8f6ebb4efbd370eb) Save this answer. (Loading when this answer was accepted…) (/posts/70825155/timeline) Show activity on this post. Here is the full location block that should show the PDF file in the browser window under the http://:3002/pdf_carpet URL: location = /pdf_carpet { alias /var/www/html/pdf_carpet/file.pdf; default_type application/pdf; add_header Content-Disposition 'inline'; } Update If an URI for accessing the PDF file ends with the slash (or it is a root URI as a special case), the above config would not work since an index file name will be appended to such an URI by the nginx (making location = /path/ { ... } not match the $uri internal nginx variable). For such a case another technique can be used: location = / { root /var/www/html/pdf_carpet; rewrite ^ /file.pdf break; add_header Content-Disposition 'inline'; } (/a/70825155) (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/70825155/edit) () Improve this answer Follow (70:3:31e,16:cb56c8caad4b1c24,10:1743959459,16:12635c594d1d5af3,8:70825155,3f49c72ee197d4ee8f5baf64dae7bfb5a35f8e470ae19e3f09277d11341d58d8) Follow this answer to receive notifications (/posts/70825155/revisions) (show all edits to this post) edited (2022-01-23 19:20:03Z) Jan 23, 2022 at 19:20 answered (2022-01-23 18:12:04Z) Jan 23, 2022 at 18:12 (/users/7121513/ivan-shatsky) (Ivan Shatsky's user avatar) (/users/7121513/ivan-shatsky) Ivan Shatsky Ivan Shatsky (reputation score 15,762) 15.8k (2 gold badges) 2 2 gold badges (25 silver badges) 25 25 silver badges (51 bronze badges) 51 51 bronze badges 5 Now works fine. Thank you :) One last question, is there a way I shouldn´t need to put the direction for the carpet? For example, to put just the following as the URL: http://:3002 – (/users/13552617/coder20) (65 reputation) Coder20 Commented (2022-01-23 18:27:37Z, License: CC BY-SA 4.0) Jan 23, 2022 at 18:27 Sure, using location = / { ... } instead of location = /pdf_carpet { ... } as I suggested in the very first comment. – (/users/7121513/ivan-shatsky) (15,762 reputation) Ivan Shatsky Commented (2022-01-23 18:30:35Z, License: CC BY-SA 4.0) Jan 23, 2022 at 18:30 If I put it like that it gives me this error: 500 Internal Server Error – (/users/13552617/coder20) (65 reputation) Coder20 Commented (2022-01-23 18:50:21Z, License: CC BY-SA 4.0) Jan 23, 2022 at 18:50 And it have location like this: location = / { alias /var/www/html/pdf_carpet/file.pdf; default_type application/pdf; add_header Content-Disposition 'inline'; } – (/users/13552617/coder20) (65 reputation) Coder20 Commented (2022-01-23 18:56:32Z, License: CC BY-SA 4.0) Jan 23, 2022 at 18:56 You are right, using an URI ended with slash will break given configuration (ngx_http_index_module will add an index file name to the URI, and in error log you'll see /var/www/html/pdf_carpet/file.pdfindex.html" is not a directory message). See an update to the answer for the solution. – (/users/7121513/ivan-shatsky) (15,762 reputation) Ivan Shatsky Commented (2022-01-23 19:22:55Z, License: CC BY-SA 4.0) Jan 23, 2022 at 19:22 (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) (70824032) (false) () (0) Your Answer (True) Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question . Provide details and share your research! But avoid … Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our (/help/how-to-answer) tips on writing great answers . Draft saved Draft discarded (59e99b481907aca79504282706e4b1db65c79b5bb11a4cbc1d88997106647265) Sign up or (/users/login?ssrc=question_page&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f70824032%2fhow-to-cofigure-nginx-to-serve-a-pdf-file%23new-answer) log in Sign up using Google Sign up using Email and Password (false) (false) Submit Post as a guest Name () () Email Required, but never shown () () Post as a guest Name () () Email Required, but never shown () () Post Your Answer Discard By clicking “Post Your Answer”, you agree to our (https://stackoverflow.com/legal/terms-of-service/public) terms of service and acknowledge you have read our (https://stackoverflow.com/legal/privacy-policy) privacy policy .(1) 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/67627646?lq=1) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/67627646/nginx-serve-a-file-without-the-filename-in-the-adress-bar?noredirect=1&lq=1) Nginx serve a file without the filename in the adress bar Related (https://stackoverflow.com/q/5694037?rq=3) (Question score (upvotes - downvotes)) 3 (https://stackoverflow.com/questions/5694037/apache2-with-pdf-and-php-this-file-does-not-start-with-pdf?rq=3) Apache2 with PDF and PHP - "This file does not start with "%PDF-" (https://stackoverflow.com/q/8535671?rq=3) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/8535671/how-can-i-force-a-link-to-a-pdf-to-tell-the-browser-to-download-it-as-a-pdf?rq=3) How can I force a link to a PDF to tell the browser to download it as a PDF? (https://stackoverflow.com/q/26671250?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/26671250/pdf-files-not-fully-loading-on-nginx-server?rq=3) PDF files not fully loading on nginx server (https://stackoverflow.com/q/36572533?rq=3) (Question score (upvotes - downvotes)) 8 (https://stackoverflow.com/questions/36572533/how-to-configure-nginx-to-serve-html-files-for-viewing-instead-of-downloading?rq=3) How to configure nginx to serve HTML files for viewing instead of downloading? (https://stackoverflow.com/q/37713946?rq=3) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/37713946/prevent-direct-access-to-pdf-files-nginx?rq=3) Prevent direct access to PDF files - Nginx (https://stackoverflow.com/q/42023339?rq=3) (Question score (upvotes - downvotes)) 2 (https://stackoverflow.com/questions/42023339/serve-pdf-file-by-location-in-nginx?rq=3) Serve pdf file by location in nginx (https://stackoverflow.com/q/46157443?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/46157443/express-angular-serve-pdf?rq=3) Express Angular - Serve PDF (https://stackoverflow.com/q/60243328?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/60243328/pdf-is-not-displayed-using-ngx-extended-pdf-viewer?rq=3) Pdf is not displayed using ngx-extended-pdf-viewer (https://stackoverflow.com/q/60704077?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/60704077/unable-to-generate-pdf-on-server-side-in-ngnix?rq=3) Unable to generate pdf on server side in NGNIX (https://stackoverflow.com/q/68605765?rq=3) (Question score (upvotes - downvotes)) 2 (https://stackoverflow.com/questions/68605765/serve-pdf-file-by-location-query-parameter?rq=3) Serve PDF file by location & query parameter (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 (Retrocomputing Stack Exchange) (https://retrocomputing.stackexchange.com/questions/31545/what-is-the-origin-of-corruption-in-rom-memories) What is the origin of corruption in ROM memories? (Home Improvement Stack Exchange) (https://diy.stackexchange.com/questions/316658/how-to-fix-lawn-where-car-drives-over) How to fix lawn where car drives over (Movies & TV Stack Exchange) (https://movies.stackexchange.com/questions/125022/in-airplane-1980-a-747-crashes-through-a-large-window-where-else-does-this) In "Airplane" (1980) a 747 crashes through a large window. Where else does this effect appear? (Bicycles Stack Exchange) (https://bicycles.stackexchange.com/questions/96490/what-causes-this-level-of-dry-rot) What causes THIS level of dry rot? (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? (Politics Stack Exchange) (https://politics.stackexchange.com/questions/91277/what-are-the-advantages-for-the-us-in-starting-a-trade-war-with-everyone-else-at) What are the advantages for the US in starting a trade war with everyone else at the same time? (Code Golf Stack Exchange) (https://codegolf.stackexchange.com/questions/279050/efficiently-navigate-a-6-sided-die) Efficiently navigate a 6 sided die (Ask Ubuntu) (https://askubuntu.com/questions/1545188/unable-to-save-images-from-web-browsers-firefox-and-chromium-based-to-local-ma) Unable to save images from web browsers (Firefox and Chromium-based) to local machine (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? (Politics Stack Exchange) (https://politics.stackexchange.com/questions/91302/would-control-of-the-faroe-islands-suffice-to-keep-denmark-in-the-arctic-council) Would control of the Faroe Islands suffice to keep Denmark in the Arctic Council if Greenland became independent? (Cross Validated) (https://stats.stackexchange.com/questions/663525/invertibility-of-dispersion-matrix-and-the-rank-of-centering-matrix) Invertibility of dispersion matrix and the rank of centering matrix (Stack Overflow) (https://stackoverflow.com/questions/79555310/implicit-declaration-of-standard-function-in-c) Implicit declaration of standard function in C (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? (Science Fiction & Fantasy Stack Exchange) (https://scifi.stackexchange.com/questions/295870/a-melted-plastic-container-results-in-a-room-temperature-super-conductor) A melted plastic container results in a room-temperature super-conductor (Home Improvement Stack Exchange) (https://diy.stackexchange.com/questions/316624/connected-two-dishwashers-to-a-single-garbage-disposal) Connected two dishwashers to a single garbage disposal (Academia Stack Exchange) (https://academia.stackexchange.com/questions/217732/desk-reject-of-a-revised-manuscript) Desk reject of a revised manuscript? (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? (Super User) (https://superuser.com/questions/1890246/backup-and-restore-partition-table-under-linux-with-partition-labels) Backup and restore partition table under Linux with partition labels? (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? (Electrical Engineering Stack Exchange) (https://electronics.stackexchange.com/questions/743185/kicad-added-footprints-only-addable-in-pcb-editor) KiCad added footprints only addable in PCB Editor (Puzzling Stack Exchange) (https://puzzling.stackexchange.com/questions/131293/two-circles-and-a-pentagon) Two circles and a pentagon (Academia Stack Exchange) (https://academia.stackexchange.com/questions/217712/is-it-normal-that-a-professor-in-a-class-i-am-taking-asks-to-design-a-graduate-c) Is it normal that a professor in a class I am taking asks to design a graduate course in return of 40% of the course grades? (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 (/feeds/question/70824032) (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/70824032) () (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