我在 nginx 上创建了子域名,我已经在 sites-available 上进行了配置并且已经将其符号链接到 sites-enabled,我还向 cloudflare 添加了记录,例如类型:Aname:Blogco...
我在 nginx 上创建了子域名,我在 sites-available 上做了配置,并且还将其符号链接到 sites-enabled,
我还向cloudflare添加了记录,例如Type: Aname: Blogcontent: IP
但是当我打开子域名时,子域名打开了主域名的根文件夹,尽管我已经在子域名配置中设置了它,如 /var/www/panel/,而子域名打开的是 /var/www/wordpress,它是主域名的根目录
这里是主域的配置
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name example.com www.example.com;
root /var/www/wordpress;
index index.php index.html index.nginx-debian.html;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
}
error_log /var/log/nginx/example_error.log;
access_log /var/log/nginx/example_access.log;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name example.com www.example.com;
ssl_certificate /etc/ssl/example.pem;
ssl_certificate_key /etc/ssl/example.key;
root /var/www/wordpress;
index index.php index.html index.nginx-debian.html;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
}
error_log /var/log/nginx/example_error.log;
access_log /var/log/nginx/example_access.log;
}
这里是子域名的配置
server {
listen 80;
listen [::]:80;
server_name panel.example.com www.panel.example.com;
root /var/www/panel;
index index.php index.html index.nginx-debian.html;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
}
}
我正在尝试使用 platformio 在运行 ubuntu 的笔记本电脑上用 libopencm3 对 stm32 设备进行编程。代码可以编译,但当我尝试运行它时,它不起作用,而是显示“无法初始化”
我正在尝试使用 platformio 在运行 ubuntu 的笔记本电脑上用 libopencm3 对 stm32 设备进行编程。代码可以编译,但当我尝试运行它时,它不起作用,而是显示“无法初始化设备”和“*** [上传] 错误 1”。
并不是说它看不到设备,因为如果我尝试在未插入任何设备的情况下上传它,它会给出不同的错误。我怀疑可能是因为我的 99-platformio-udev.rules。我尝试按照 platformio 网站 操作。为此,我确实在 /etc/udev/rules.d/99-platformio-udev.rules 中有一个名为 99-platformio-udev.rules 的文件,它与网站上最新的文件相匹配,并且确实执行了 sudo service udev restart,但我认为我可能做错了下一步。它说
Ubuntu/Debian 用户如果不是“root”,则可能需要将自己的“用户名”添加到“dialout”组,这样做会发出
sudo usermod -a -G dialout $USER sudo usermod -a -G plugdev $USER
但我不确定这是什么意思,所以我尝试按原样运行命令,但我认为这是错误的。我该怎么办?下面我将介绍设备与笔记本电脑的连接、我如何输入命令以及完整的输出/错误。如果需要任何其他信息,请询问
连接
我的 usermod 命令
这是platformio.ini platformio.ini
Processing genericSTM32F446RE (platform: ststm32; board: genericSTM32F446RE; framework: libopencm3)
------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/genericSTM32F446RE.html
PLATFORM: ST STM32 (17.3.0) > STM32F446RE (128k RAM. 512k Flash)
HARDWARE: STM32F446RET6 180MHz, 128KB RAM, 512KB Flash
DEBUG: Current (blackmagic) External (blackmagic, jlink, stlink)
PACKAGES:
- framework-libopencm3 @ 1.10000.200730 (1.0.0)
- tool-dfuutil @ 1.11.0
- tool-dfuutil-arduino @ 1.11.0
- tool-openocd @ 3.1200.0 (12.0)
- tool-stm32duino @ 1.0.1
- toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> https://bi
{need to seperate the next part to post because its a shortened url but its one line}
t.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Checking size .pio/build/genericSTM32F446RE/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 0.0% (used 12 bytes from 131072 bytes)
Flash: [ ] 0.3% (used 1692 bytes from 524288 bytes)
Configuring upload protocol...
AVAILABLE: blackmagic, dfu, jlink, serial, stlink
CURRENT: upload_protocol = serial
Looking for upload port...
Auto-detected: /dev/ttyACM0
Uploading .pio/build/genericSTM32F446RE/firmware.bin
Failed to init device.
stm32flash Arduino_STM32_0.9
http://github.com/rogerclarkmelbourne/arduino_stm32
Using Parser : Raw BINARY
Interface serial_posix: 115200 8E1
*** [upload] Error 1
================================================================ [FAILED] Took 1.86 seconds ================================================================
* The terminal process "platformio 'run', '--target', 'upload'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.