CPanel Silex WebServer配置文件在哪里?(Where is the CPanel Silex WebServer configuration file)

编程入门 行业动态 更新时间:2024-10-23 03:24:38
CPanel Silex WebServer配置文件在哪里?(Where is the CPanel Silex WebServer configuration file)

我想在本地环境中运行我的网站代码。 问题是,我的本地Silex无法像在CPanel服务器中一样工作。

CPanel Silex WebServer配置文件位于何处? 我想查看它并使我的本地Silex配置与它相同。

更新:

我的意思是用WebServer配置基于这个链接: http : //silex.sensiolabs.org/doc/master/web_servers.html

例如,对于Silex来说,如果我们使用Apache,我们需要使用htaccess文件来配置Web服务器:

<IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On #RewriteBase /path/to/app RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L] </IfModule>

I want to run my site's code in the local environment. The problem is, my local Silex doesn't work just like in the CPanel server.

Where is the CPanel Silex WebServer configuration file located? I want to view it and make my local Silex configuration the same with it.

UPDATE:

What I mean with WebServer configuration is based on this link: http://silex.sensiolabs.org/doc/master/web_servers.html

For Silex to work, for example, if we use Apache, we need to configure the web server by using htaccess file:

<IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On #RewriteBase /path/to/app RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L] </IfModule>

最满意答案

终于找到了我自己的答案。

在public_html文件夹中,您需要找到.htaccess文件。 如果您看不到它,请将文件管理器设置为显示来自设置的隐藏文件。 将.htaccess复制到您的本地环境,就是这样。

Finally found the answer on my own.

In public_html folder, you need to find .htaccess file. If you can't see it, set the File Manager to show hidden files from settings. Copy that .htaccess to your local environment and that's it.

更多推荐

本文发布于:2023-08-05 06:19:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1430224.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:配置文件   Silex   CPanel   WebServer   file

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!