<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="https://v1sta.xyz/wp-content/plugins/pretty-rss-feeds/xslt/pretty-feed.xsl" type="text/xsl" media="screen" ?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/">

<channel>
	<title>Bookstack &#8211; 景の域</title>
	<atom:link href="https://v1sta.xyz/tag/bookstack/feed/" rel="self" type="application/rss+xml" />
	<link>https://v1sta.xyz</link>
	<description>远景的幻想空间</description>
	<lastBuildDate>Mon, 06 Jul 2026 08:59:53 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>

<image>
	<url>https://v1sta.xyz/wp-content/uploads/2026/03/V1sta-Orb-Output512-2-60x60.png</url>
	<title>Bookstack &#8211; 景の域</title>
	<link>https://v1sta.xyz</link>
	<width>32</width>
	<height>32</height>
</image> 
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/>
<atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/>
<atom:link rel="hub" href="https://websubhub.com/hub"/>
<atom:link rel="self" href="https://v1sta.xyz/tag/bookstack/feed/"/>
	<item>
		<title>解决Bookstack审计IP显示来自Cloudflare CDN的问题</title>
		<link>https://v1sta.xyz/tech/bookstack-cloudflare-x-forwarded-real_ip/</link>
					<comments>https://v1sta.xyz/tech/bookstack-cloudflare-x-forwarded-real_ip/#respond</comments>
		
		<dc:creator><![CDATA[域主 V1STA]]></dc:creator>
		<pubDate>Mon, 06 Jul 2026 08:58:47 +0000</pubDate>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Bookstack]]></category>
		<guid isPermaLink="false">https://v1sta.xyz/?p=6465</guid>

					<description><![CDATA[关于Cloudflare的CDN IP穿透的问题屡见不鲜。以前景の域还在FRP穿透的时期就有遇到类似的问题。博 &#8230; <a href="https://v1sta.xyz/tech/bookstack-cloudflare-x-forwarded-real_ip/" class="more-link">继续阅读<span class="screen-reader-text">解决Bookstack审计IP显示来自Cloudflare CDN的问题</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">关于Cloudflare的CDN IP穿透的问题屡见不鲜。<br>以前景の域还在FRP穿透的时期就有遇到类似的问题。<br>博客是个好东西，总是记下来一些意想不到的事情。这次搭建Bookstack实际查阅后台也同样发现审计显示都是CF的回源IP的问题。</p>



<span id="more-6465"></span>



<p class="wp-block-paragraph">这里先编辑Bookstack网站目录下的.env文件，<br>添加CF CDN回源IP的列表：</p>



<pre class="wp-block-code"><code>APP_PROXIES="173.245.48.0/20, 103.21.244.0/22, 103.22.200.0/22, 103.31.4.0/22, 141.101.64.0/18, 108.162.192.0/18, 190.93.240.0/20, 188.114.96.0/20, 197.234.240.0/22, 198.41.128.0/17, 162.158.0.0/15, 104.16.0.0/13, 104.24.0.0/14, 172.64.0.0/13, 131.0.72.0/22, 2400:cb00::/32, 2606:4700::/32, 2803:f800::/32, 2405:b500::/32, 2405:8100::/32, 2a06:98c0::/29, 2c0f:f248::/32"</code></pre>



<p class="wp-block-paragraph">随后，在Nginx目录中存储的网站域名的conf，<br>Webinoly找#WebinolyCustom区域，<br>寻找在location部分添加proxy_set_header的相关穿透属性：</p>



<pre class="wp-block-code"><code>location / {
	try_files $uri $uri/ /index.php?$query_string;
	proxy_set_header Host $host;
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	proxy_set_header X-Forwarded-Proto $scheme;
	}</code></pre>



<p class="wp-block-paragraph">然后想办法让Nginx配置文件的http部分引用标头相关的列表，这里可以作为全局模板存储在conf.d目录内。</p>



<pre class="wp-block-code"><code>set_real_ip_from 173.245.48.0/20;
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 104.16.0.0/13;
set_real_ip_from 104.24.0.0/14;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 131.0.72.0/22;
set_real_ip_from 2400:cb00::/32;
set_real_ip_from 2606:4700::/32;
set_real_ip_from 2803:f800::/32;
set_real_ip_from 2405:b500::/32;
set_real_ip_from 2405:8100::/32;
set_real_ip_from 2a06:98c0::/29;
set_real_ip_from 2c0f:f248::/32;
real_ip_header X-Forwarded-For;</code></pre>



<p class="wp-block-paragraph">最后重启Nginx，这个时候再去看审计后台就是穿透后的IP信息了，搞定。</p>



<details class="wp-block-details is-layout-flow wp-block-details-is-layout-flow"><summary>剧透警告</summary>
<p class="has-small-font-size wp-block-paragraph">话说人工智能是有点厉害，人力合成是比不过机器神经的自动替换。上面这个标头列表还是直接从谷歌的AI拷出来的，虽然不难想象应该是用了什么神经模型自动从CF的IP列表抓取然后逐段加前后缀，这些IP几乎和CF官方完全一致……</p>



<p class="has-small-font-size wp-block-paragraph">虽然我大概还是不会主动使用AI，我也不懂Token啥的。<br>但是总觉得只是在用搜索引擎就已经不知不觉在用这些玩意的智能技术了。<br>计算机技术类大概是不可避免AI模型的分析了。</p>
</details>



<p class="wp-block-paragraph"></p>

<p><a href="https://v1sta.xyz/tech/bookstack-cloudflare-x-forwarded-real_ip/" rel="nofollow">来源</a></p>]]></content:encoded>
					
					<wfw:commentRss>https://v1sta.xyz/tech/bookstack-cloudflare-x-forwarded-real_ip/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<enclosure url="https://v1sta.xyz/wp-content/uploads/2026/03/V1sta-Orb-Output512-2.png" length="199214" type="image/png"/><media:content url="https://v1sta.xyz/wp-content/uploads/2026/03/V1sta-Orb-Output512-2.png" width="512" height="512" medium="image" type="image/png"/>	</item>
		<item>
		<title>BookStack 搭建</title>
		<link>https://v1sta.xyz/tech/install-bookstack-with-webinoly/</link>
					<comments>https://v1sta.xyz/tech/install-bookstack-with-webinoly/#respond</comments>
		
		<dc:creator><![CDATA[域主 V1STA]]></dc:creator>
		<pubDate>Sun, 15 Feb 2026 10:44:47 +0000</pubDate>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Bookstack]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Webinoly]]></category>
		<guid isPermaLink="false">https://v1sta.xyz/?p=3194</guid>

					<description><![CDATA[BookStack 是一个基于PHP Laravel的文档网站应用程序，主要特点是采用了Material De &#8230; <a href="https://v1sta.xyz/tech/install-bookstack-with-webinoly/" class="more-link">继续阅读<span class="screen-reader-text">BookStack 搭建</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.bookstackapp.com/">BookStack</a> 是一个基于PHP Laravel的文档网站应用程序，主要特点是采用了Material Design的UI外观，具有书籍（单行手册）与书架（收藏专栏）两种文档的管理概念，以及便于编辑的在线编辑器界面。</p>
<p>本文以Webinoly提供的LNMP环境，记录安装BookStack的过程。</p>
<p><span id="more-3194"></span></p>
<p>目前，安装BookStack要求的配置是：</p>
<ul>
<li><strong>命令行访问权限</strong> 并安装 <code>gnupg git unzip curl</code> 软件包</li>
<li><strong>PHP 版本</strong>&gt;= 8.2
<ul>
<li>需要在命令行执行php命令的权限</li>
<li>要求开启的PHP扩展：<code>gd, dom, iconv, mbstring, mysqlnd, openssl, pdo, pdo_mysql, tokenizer, xml, zip</code></li>
<li>可选扩展：<code>ldap</code> <em>（用于 LDAP 身份验证）</em>，<code>exif</code> <em>（用于图像处理）</em></li>
<li>对于PHP MySQL数据库驱动，首选 <code>nd</code> (Native Driver) 扩展，否则使用默认 <code>mysql</code> 驱动扩展。</li>
</ul>
</li>
<li><strong>MySQL 版本</strong>&gt;= 8.0 或<strong>MariaDB 版本</strong>&gt;= 10.6
<ul>
<li>用于存储 BookStack 内容和数据</li>
<li>建议单独创建拥有所有权限的单个数据库</li>
</ul>
</li>
<li><strong>Git</strong> 用于下载与更新</li>
<li><strong><a href="https://getcomposer.org/">Composer 版本</a></strong>&gt;= v2.2.0 用于安装和管理依赖项</li>
<li><strong>兼容 PHP 的 Web 服务器</strong> 例如 Nginx</li>
</ul>
<h2>创建网站</h2>
<p>先通过Webinoly的site命令创建PHP网站、及其对应目录与数据库。顺带配置SSL证书：</p>
<pre><code class="language-bash">site domain.ltd -php -mysql
site domain.ltd -ssl=on 
# 可选：自定义证书参数 -ssl-crt=[证书位置] -ssl-key=[证书私钥位置]
</code></pre>
<h2>手动安装</h2>
<p>前往 <code>/var/www/domain.ltd/</code> 目录，克隆BookStack的Git存储库：</p>
<pre><code class="language-bash">cd /var/www/domain.ltd/ 
git clone https://source.bookstackapp.com/bookstack.git --branch release --single-branch bookstack
</code></pre>
<p>进入bookstack目录，执行Composer安装：</p>
<pre><code class="language-bash">cd ./bookstack
composer install --no-dev
</code></pre>
<h2>基本配置</h2>
<p>基于<code>.env.example</code> 模板复制，创建 <code>.env</code> 配置文件，填入网址和数据库信息：</p>
<pre><code># Application URL
APP_URL=https://example.com

# Database details
DB_HOST=localhost
DB_DATABASE=database_database
DB_USERNAME=database_username
DB_PASSWORD=database_user_password
</code></pre>
<p><em>后续可通过命令 <code>php artisan bookstack:update-url</code> 更新应用网址也就是APP_URL</em>：</p>
<p>随后在终端执行生成应用密钥的命令：</p>
<pre><code>php artisan key:generate
</code></pre>
<h2>配置Nginx</h2>
<p>下文的Nginx配置，以book.lan域名并以HTTP（仅80端口）访问为例：</p>
<pre><code># WebinolyNginxServerStart
server {
	listen 80;
	listen [::]:80;

	server_name book.lan;

	access_log /var/log/nginx/book.lan.access.log we_log;
	error_log /var/log/nginx/book.lan.error.log;

	root /var/www/book.lan/bookstack/public;

	index index.php index.html index.htm;

	include common/auth.conf;

	# WebinolyCustom
	  location / {
	    try_files $uri $uri/ /index.php?$query_string;
	  }
  
	  location ~ \.php$ {
	    include fastcgi_params;
	    fastcgi_pass unix:/run/php/php-fpm.sock;
	  }
	# WebinolyCustomEnd

	#include common/phpx.conf;
	include common/locations.conf;
	include common/header.conf;
	include /var/www/book.lan/*-nginx.conf;
	include /etc/nginx/conf.d/*.conf.srv;
}
</code></pre>
<p><strong>分析：</strong></p>
<p>Webinoly默认的php配置 <code>include common/phpx.conf;</code><br />
不适用Bookstack要求的query_string，需要将其注释而不调用。</p>
<p>官方文档位于 <code>location ~ \.php$ {</code> 部分的配置行： <code>include snippets/fastcgi-php.conf;</code><br />
也不适用于目前Webinoly安装的配置（没有这个目录与文件）， 不然会无法调用PHP FastCGI导致白屏。</p>
<p>取而代之的是：<code>include fastcgi_params;</code><br />
后者文件实际位置位于nginx目录根。</p>
<hr />
<h2>使用</h2>
<p>此时打开浏览器即可使用 Bookstack ，创建并登入账号……</p>

<p><a href="https://v1sta.xyz/tech/install-bookstack-with-webinoly/" rel="nofollow">来源</a></p>]]></content:encoded>
					
					<wfw:commentRss>https://v1sta.xyz/tech/install-bookstack-with-webinoly/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<enclosure url="https://v1sta.xyz/wp-content/uploads/2026/02/bookstack-hero-screenshot.webp" length="92248" type="image/webp"/><media:content url="https://v1sta.xyz/wp-content/uploads/2026/02/bookstack-hero-screenshot.webp" width="1824" height="996" medium="image" type="image/webp"/>	</item>
	</channel>
</rss>
