| <!doctype html> |
| <html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-guides/deploy-subdirectory" data-has-hydrated="false"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="generator" content="Docusaurus v3.1.1"> |
| <title data-rh="true">Deploy subdirectory | Apache Answer</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://answer.apache.org/img/head-icon.png"><meta data-rh="true" name="twitter:image" content="https://answer.apache.org/img/head-icon.png"><meta data-rh="true" property="og:url" content="https://answer.apache.org/docs/deploy-subdirectory"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" property="og:locale:alternate" content="zh_CN"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="keywords" content="Free, Open-source, Q&A Platform, Knowledge Sharing Platform, Community Forum, Knowledge Base, Developer Hub, Support Center"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Deploy subdirectory | Apache Answer"><meta data-rh="true" name="description" content="This function is implemented based on react-router's basename, so it is not applicable to subdirectories implemented through nginx configuration deploy."><meta data-rh="true" property="og:description" content="This function is implemented based on react-router's basename, so it is not applicable to subdirectories implemented through nginx configuration deploy."><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://answer.apache.org/docs/deploy-subdirectory"><link data-rh="true" rel="alternate" href="https://answer.apache.org/docs/deploy-subdirectory" hreflang="en"><link data-rh="true" rel="alternate" href="https://answer.apache.org/zh-CN/docs/deploy-subdirectory" hreflang="zh-CN"><link data-rh="true" rel="alternate" href="https://answer.apache.org/docs/deploy-subdirectory" hreflang="x-default"><script data-rh="true">var _paq=window._paq=window._paq||[];_paq.push(["setDoNotTrack",!0]),_paq.push(["disableCookies"]),_paq.push(["trackPageView"]),_paq.push(["enableLinkTracking"]),function(){var a="https://analytics.apache.org/";_paq.push(["setTrackerUrl",a+"matomo.php"]),_paq.push(["setSiteId","75"]);var e=document,p=e.createElement("script"),t=e.getElementsByTagName("script")[0];p.async=!0,p.src=a+"matomo.js",t.parentNode.insertBefore(p,t)}()</script><link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="Apache Answer RSS Feed"> |
| <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="Apache Answer Atom Feed"> |
| |
| |
| |
| |
| <link rel="stylesheet" href="/fonts/fonts.css"><link rel="stylesheet" href="/assets/css/styles.0fc06688.css"> |
| <script src="/assets/js/runtime~main.1dde0d7b.js" defer="defer"></script> |
| <script src="/assets/js/main.6f1c96a6.js" defer="defer"></script> |
| </head> |
| <body class="navigation-with-keyboard"> |
| <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"light")}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_D8pK" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top navbar--primary"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/logo.svg" alt="Answer Logo" class="themedImage_Pn4p themedImage--light_PnYV"><img src="/img/logo.svg" alt="Answer Logo" class="themedImage_Pn4p themedImage--dark_eYgw"></div></a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs">Docs<!-- --></a><a class="navbar__item navbar__link" href="/plugins">Plugins<!-- --></a><a class="navbar__item navbar__link" href="/blog">Blog<!-- --></a><a class="navbar__item navbar__link" href="/download">Download<!-- --></a><div class="navbar__item dropdown dropdown--hoverable"><a class="navbar__link" aria-haspopup="true" aria-expanded="false" role="button" href="/community/support">Community<!-- --></a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/community/support">Support<!-- --></a></li><li><a href="https://meta.answer.dev" target="_blank" rel="noopener noreferrer" class="dropdown__link">Q&A Community<!-- --></a></li><li><a class="dropdown__link" href="/community/team">Team<!-- --></a></li><li><a class="dropdown__link" href="/community/security">Security<!-- --></a></li><li><a class="dropdown__link" href="/community/security-model">Security Model<!-- --></a></li><li><a class="dropdown__link" href="/community/contributing">Contributing<!-- --></a></li><li><a href="https://github.com/apache/answer/projects" target="_blank" rel="noopener noreferrer" class="dropdown__link">Roadmap<!-- --></a></li></ul></div><div class="navbar__item dropdown dropdown--hoverable"><a href="https://www.apache.org/" target="_blank" rel="noopener noreferrer" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">ASF<!-- --></a><ul class="dropdown__menu"><li><a href="https://www.apache.org" target="_blank" rel="noopener noreferrer" class="dropdown__link">Foundation<!-- --></a></li><li><a href="https://www.apache.org/licenses/" target="_blank" rel="noopener noreferrer" class="dropdown__link">License<!-- --></a></li><li><a href="https://www.apache.org/events/current-event.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">Events<!-- --></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">Sponsorship<!-- --></a></li><li><a href="https://privacy.apache.org/policies/privacy-policy-public.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">Privacy<!-- --></a></li><li><a class="dropdown__link" href="/community/security">Security<!-- --></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">Thanks<!-- --></a></li></ul></div></div><div class="navbar__items navbar__items--right"><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link bi bi-translate"><svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" class="iconLanguage_DSK9"><path fill="currentColor" d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path></svg>English<!-- --></a><ul class="dropdown__menu"><li><a href="/docs/deploy-subdirectory" target="_self" rel="noopener noreferrer" class="dropdown__link dropdown__link--active" lang="en">English<!-- --></a></li><li><a href="/zh-CN/docs/deploy-subdirectory" target="_self" rel="noopener noreferrer" class="dropdown__link" lang="zh-CN">简体中文<!-- --></a></li></ul></div><a href="https://x.com/ApacheAnswer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link bi bi-twitter-x navbar-icon-link"></a><a href="https://discord.gg/a6PZZbfnFx" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link bi bi-discord navbar-icon-link"></a><a href="https://github.com/apache/answer" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link bi bi-github navbar-icon-link"></a><div class="navbarSearchContainer_dCNk"><div class="navbar__search searchBarContainer_njkA" dir="ltr"><input placeholder="Search" aria-label="Search" class="navbar__search-input searchInput_C629"><div class="loadingRing_gsZq searchBarLoadingRing_YRCl"><div></div><div></div><div></div><div></div></div></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_eExm"><div class="docsWrapper_utsK"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_ntye" type="button"></button><div class="docRoot_vZM_"><aside class="theme-doc-sidebar-container docSidebarContainer_VQqE"><div class="sidebarViewport_A4gE"><div class="sidebar_mhZE"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_Y1UP"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/">Introduction<!-- --></a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="true" href="/docs/installation">Getting Started</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/installation">Installation<!-- --></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/upgrade">Upgrade<!-- --></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/command-line">Command Line<!-- --></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/configfile">Config File<!-- --></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/env">Environment Variables<!-- --></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/plugins">Using Plugins<!-- --></a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" href="/docs/questions">User Guides</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/questions">Questions<!-- --></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/tags">Tags<!-- --></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/users">Users<!-- --></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/review">Review<!-- --></a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/docs/settings">Moderation</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/docs/flags">Commons</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/deploy-subdirectory">Deploy subdirectory<!-- --></a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" href="/docs/development">Developer Guides</a><button aria-label="Expand sidebar category 'Developer Guides'" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/notice">Notice<!-- --></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ<!-- --></a></li></ul></nav></div></div></aside><main class="docMainContainer_dYoB"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_z5aJ"><div class="docItemContainer_c0TR"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Alpn" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_xK9p"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">User Guides</span><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Deploy subdirectory</span><meta itemprop="position" content="2"></li></ul></nav><div class="tocCollapsible_FsNm theme-doc-toc-mobile tocMobile_bxCs"><button type="button" class="clean-btn tocCollapsibleButton_a_s8">On this page<!-- --></button></div><div class="theme-doc-markdown markdown"><h1>Deploy subdirectory</h1> |
| <!-- --><p>This function is implemented based on react-router's <!-- --><a href="https://reactrouter.com/en/main/router-components/memory-router#basename" target="_blank" rel="noopener noreferrer">basename</a>, so it is not applicable to subdirectories implemented through <!-- --><code>nginx</code> configuration deploy.<!-- --></p> |
| <!-- --><p>Apache Answer supports subdirectory deployment as of version 1.3.5. This configuration allows you to set a route prefix for your application, e.g., if you have routes <!-- --><code>/</code> and <!-- --><code>/questions</code>, and you set <!-- --><code>base_url</code> to /foo, you can access the previous routes via <!-- --><code>/foo</code> and <!-- --><code>/foo/questions</code>.<!-- --></p> |
| <!-- --><div class="theme-admonition theme-admonition-warning admonition_inHR alert alert--warning"><div class="admonitionHeading_piGE"><span class="admonitionIcon_ROqA"><svg viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>warning<!-- --></div><div class="admonitionContent_BA39"><p>The configuration must be set at build time and cannot be changed without a rebuild because the value is inlined in the client package. This means that it is necessary for the user to modify the configuration file and then compile it themselves in order to complete the build of the project.</p></div></div> |
| <!-- --><h3 class="anchor anchorWithStickyNavbar_loeA" id="steps">Steps<!-- --><a href="#steps" class="hash-link" aria-label="Direct link to Steps" title="Direct link to Steps"></a></h3> |
| <!-- --><ol> |
| <!-- --><li>Modify the configuration file <!-- --><code>/configs/config.yaml</code>.<!-- --></li> |
| <!-- --><li>Run the command to build the project <!-- --><code>make ui</code> <!-- --><code>make build</code>.<!-- --></li> |
| <!-- --><li>Run the command <!-- --><code>INSTALL_PORT=80 . /answer init -C . /answer-data/</code> Initialize the project, note that you need to add your base_url (<!-- --><a href="http://localhost:80/%7Bbase_url%7D/install/" target="_blank" rel="noopener noreferrer">http://localhost:80/{base_url}/install/</a>) to the access path here to see if the configuration is successful.<!-- --></li> |
| <!-- --><li>Packaging into docker or releasing the above binary directly, see <!-- --><a href="/docs/plugins#build">here</a></li> |
| <!-- --></ol> |
| <!-- --><h3 class="anchor anchorWithStickyNavbar_loeA" id="configuration-file-introduction">Configuration file introduction<!-- --><a href="#configuration-file-introduction" class="hash-link" aria-label="Direct link to Configuration file introduction" title="Direct link to Configuration file introduction"></a></h3> |
| <!-- --><p>In order to unify the management of configuration-related variables, starting from v1.3.5, the environment variables in the ui directory are unified into <!-- --><code>/configs/config.yaml</code> in the root directory, and the configurations here will be generated into <!-- --><code>/ui/.env.production</code> by scripts, so as to realize the injection of environment variables.<!-- --></p> |
| <!-- --><p>Note: This only affects variables in the production environment, for development mode please continue to refer <!-- --><a href="/docs/development">here</a>. For more information on configuration files, please refer to <!-- --><a href="/docs/configfile">here</a>.<!-- --></p> |
| <!-- --><div class="codeBlockContainer_APcc theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_m3Ux"><pre tabindex="0" class="prism-code language-text codeBlock_qGQc thin-scrollbar"><code class="codeBlockLines_p187"><span class="token-line" style="color:#393A34"><span class="token plain">...</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">ui:</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> public_url: '/'</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> api_url: '/'</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> base_url: ''</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span></code></pre><div class="buttonGroup_6DOT"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_FhaS" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_phi_"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_FfTR"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div> |
| <!-- --><h3 class="anchor anchorWithStickyNavbar_loeA" id="base_url">base_url<!-- --><a href="#base_url" class="hash-link" aria-label="Direct link to base_url" title="Direct link to base_url"></a></h3> |
| <!-- --><p>The path of the subdirectory. The default value is <!-- --><code>''</code>, which means it is deployed in the root directory. If the value is modified, for example <!-- --><code> base_url: '/foo''</code>, all access paths of the page will be added with this prefix.<!-- --></p> |
| <!-- --><p>Normally, if this value is modified, <!-- --><code>public_url</code> should also remain consistent.<!-- --></p> |
| <!-- --><h3 class="anchor anchorWithStickyNavbar_loeA" id="public_url">public_url<!-- --><a href="#public_url" class="hash-link" aria-label="Direct link to public_url" title="Direct link to public_url"></a></h3> |
| <!-- --><p>The path of static resources. The default value is <!-- --><code>'/'</code>. If the website uses CDN to host static resources, this value can be set to the URL of CDN. If <!-- --><code>base_url</code> is modified and CDN is not used, then this value also needs to be Same value as <!-- --><code>base_url</code>.<!-- --></p> |
| <!-- --><h3 class="anchor anchorWithStickyNavbar_loeA" id="api_url">api_url<!-- --><a href="#api_url" class="hash-link" aria-label="Direct link to api_url" title="Direct link to api_url"></a></h3> |
| <!-- --><p>The default value is <!-- --><code>''</code>, which is normally not adjusted. However, if your project uses nginx to proxy subpaths, you need to match the value of <!-- --><code>base_url</code>.<!-- --></p> |
| <!-- --><div class="theme-admonition theme-admonition-tip admonition_inHR alert alert--success"><div class="admonitionHeading_piGE"><span class="admonitionIcon_ROqA"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip<!-- --></div><div class="admonitionContent_BA39"><p>The KEY written to the <!-- --><code>.env</code> file will be converted to:<!-- --></p><div class="codeBlockContainer_APcc theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_m3Ux"><pre tabindex="0" class="prism-code language-text codeBlock_qGQc thin-scrollbar"><code class="codeBlockLines_p187"><span class="token-line" style="color:#393A34"><span class="token plain">PUBLIC_URL=/</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">REACT_APP_API_URL=/</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">REACT_APP_BASE_URL=</span><br></span></code></pre><div class="buttonGroup_6DOT"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_FhaS" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_phi_"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_FfTR"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/apache/answer-website/edit/main/docs/guides/deploy-subdirectory.md" target="_blank" rel="noopener noreferrer" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_N_05" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page<!-- --></a></div><div class="col lastUpdated_VsjB"><span class="theme-last-updated">Last updated<!-- --> on <!-- --><b><time datetime="2025-02-17T09:31:04.000Z">Feb 17, 2025</time></b> by <!-- --><b>Fen</b></span></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/reputation"><div class="pagination-nav__sublabel">Previous<!-- --></div><div class="pagination-nav__label">Reputation</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/docs/development"><div class="pagination-nav__sublabel">Next<!-- --></div><div class="pagination-nav__label">Development Guide</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_fx0E thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#steps" class="table-of-contents__link toc-highlight">Steps</a></li><li><a href="#configuration-file-introduction" class="table-of-contents__link toc-highlight">Configuration file introduction</a></li><li><a href="#base_url" class="table-of-contents__link toc-highlight">base_url</a></li><li><a href="#public_url" class="table-of-contents__link toc-highlight">public_url</a></li><li><a href="#api_url" class="table-of-contents__link toc-highlight">api_url</a></li></ul></div></div></div></div></main></div></div></div><footer class="footer"><div class="container py-3"><div class="d-flex justify-content-between flex-wrap text-center"><div><div class="mb-3"><a href="https://www.apache.org/" target="_blank"><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 525" role="img" style="width:120px"><defs><style>.cls-1{fill:#7c297d}.cls-3{fill:#dd552c}.cls-4{fill:#d22128}</style></defs><path class="cls-1" d="M458.804 181.745h49.045l87.413 220.094h-53.455l-14.777-38.044h-87.406l-15.094 38.044H371.39l87.413-220.094Zm55.65 142.746L483.33 244l-30.814 80.491h61.938ZM622.717 331.722h48.735c.317 21.066 16.037 33.332 40.246 33.332 20.75 0 33.958-8.49 33.958-23.267 0-15.41-14.151-24.526-45.275-31.447-51.57-10.69-76.096-32.066-76.096-68.226 0-39.93 31.757-64.771 82.384-64.771 52.19 0 85.521 28.296 85.521 72.628h-48.11c0-19.806-13.834-31.756-36.785-31.756-21.065 0-33.958 8.806-33.958 23.267 0 13.525 11.634 22.014 45.275 29.871 54.714 12.892 77.665 33.642 77.665 68.542 0 41.505-32.073 66.347-84.262 66.347-55.34 0-89.298-28.929-89.298-74.52ZM852.91 181.745h137.716v45.276h-87.722v55.023h79.859v44.023h-79.86v75.772H852.91V181.745Z"></path><path class="cls-3" d="M141.108 209.888c13.187-32.608 27.9-65.152 43.688-93.997-23.567-17.504-46.196-55.249-55.493-71.972-3.34 3.794-5.508 8.163-6.49 11.718-8.76 31.625 22.42 69.814-2.693 55.861C99.195 99.871 52.08 74.41 34.107 99.717c20.128 25.862 72.773 90.93 107 110.171Z"></path><path d="M184.796 115.891c15.297-27.95 31.6-52.428 48.501-70.063 0 0-16.858 24.4-40.936 73.18 14.582 4.016 56.113 12.256 113.96-2.686 1.422-10.513-5.645-22.075-40.863-25.947-22.993-2.524 27.597-54.902-9.052-79.674a46.281 46.281 0 0 0-3.486-2.14 45.29 45.29 0 0 0-3.911-1.205c-42.803-11.17-48.736 61.409-65.816 45.806-27.6-25.212-45.022-19.321-53.89-9.243 9.297 16.723 31.926 54.468 55.493 71.972Z" style="fill:#f79a23"></path><path class="cls-4" d="M106.682 303.838c9.662-28.946 21.286-61.466 34.426-93.95-34.228-19.241-86.873-84.31-107-110.171-3.594 5.056-6.05 12.108-6.868 21.752-4.39 51.802 49.052 90.153 38.398 97.158-14.092 9.267-42.141-22.26-53.196-2.229 16.023 20.584 48.662 57.777 94.24 87.44Z"></path><path class="cls-3" d="M254.756 192.118c-27.059-9.65 28.276-35.533 46.245-62.991 2.3-3.511 4.676-8.049 5.32-12.805-57.847 14.942-99.378 6.702-113.96 2.686-12.465 25.257-26.859 57.084-41.87 95.458 15.634 6.685 79.47 31.38 169.637 31.507 15.16-39.485-39.691-44.699-65.372-53.855Z"></path><path class="cls-4" d="M117.137 309.049c15.9 4.955 68.584 19.756 124.537 17.528 7.517-20.352-20.586-22.338-22.875-38.661-1.772-12.63 73.957 10.614 98.323-35.311a59.485 59.485 0 0 0 3.006-6.632c-90.167-.127-154.003-24.822-169.637-31.507-10.97 28.044-22.256 59.517-33.354 94.583Z"></path><path class="cls-1" d="M117.137 309.049c-7.145 22.57-14.193 46.682-21.035 72.164a1771.75 1771.75 0 0 0-7.19 27.643c53.106 17.531 102.008.04 103.666-21.638.014-.172-.018-.3-.008-.464 1.264-22.961-33.15-10.234-32.336-24.038.818-13.906 60.081-.081 78.409-29.895a34.139 34.139 0 0 0 3.03-6.244c-55.952 2.228-108.636-12.573-124.536-17.528ZM12.442 216.398c-.774 1.404-1.472 3.026-2.068 4.965-10.292 33.45 62.485 78.385 52.583 88.18-8.925 8.827-20.557-11.343-34.9-3.012a22.05 22.05 0 0 0-4.806 3.75c-16.221 16.619-.254 64.496 45.77 90.052-10.74 36.062-21.432 76.351-31.9 118.486 3.798-1.33 8.342-2.663 9.473-6.245 1.698-6.981 12.194-49.462 29.235-107.094 0 0 3.11-11.806 8.804-31.255a1996.422 1996.422 0 0 1 22.049-70.387c-45.578-29.663-78.217-66.856-94.24-87.44ZM404.167 144.735h9.264v-62.2h23.348v-9.062h-55.96v9.062h23.348v62.2zM464.853 112.958h36.469v31.777h9.358V73.473h-9.358v30.417h-36.47V73.473h-9.256v71.262h9.257v-31.777zM581.403 135.963h-35.17v-23.106h31.588v-8.772h-31.588V82.151h34.106v-8.678h-43.363v71.262h44.427v-8.772z"></path></svg></a></div><div class="fs-14"><div class="my-3"><span>Copyright © 2023 - <!-- -->2026<!-- --> The Apache Software Foundation, Licensed under the Apache License, Version 2.0.<!-- --></span><br><span>Apache, Apache Answer, the Apache logo and the Apache Answer logo are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries.</span></div><span>Feature icons by <!-- --> <!-- --><a href="https://www.flaticon.com" class="link-secondary" target="_blank">Freepik</a>.<!-- --></span></div></div></div></div></footer></div> |
| </body> |
| </html> |