I've been developing my website using a local WAMP server, on my own laptop.
我一直在自己的笔记本电脑上使用本地WAMP服务器开发我的网站。
I just recently purchased a domain, and deployed my website there.
我刚刚购买了一个域名,并在那里部署了我的网站。
So far, everything works fine, except : the "Public_Html" folder on the Host-Server did not have a few files, which I thought should be there by default.
到目前为止,一切正常,除了:Host-Server上的“Public_Html”文件夹没有几个文件,我认为默认情况下应该存在。
(1) .htaccess
(2) php.ini
(3) httpd.conf
(1).htaccess(2)php.ini(3)httpd.conf
The first two are no problem. I can simply create new ones myself (or, copy-paste the ones I currently use on my WAMP server)
前两个没问题。我可以自己创建新的(或者,复制粘贴我目前在WAMP服务器上使用的那些)
However, the HTTPD.CONF
file is a mystery to me.
但是,HTTPD.CONF文件对我来说是一个谜。
Firstly, I have no idea where it is located. The domain-hosting service I am using is linux-based (not that it matters, I guess)
首先,我不知道它的位置。我使用的域名托管服务是基于Linux的(不是很重要,我猜)
Secondly, I could, of course, simply copy the httpd.conf
file I have now on my WAMP server. But, where would I copy it to ? I already copied it straight to the Public_Html
folder, but that solved nothing.
其次,我当然可以简单地复制我现在在WAMP服务器上的httpd.conf文件。但是,我会把它复制到哪里?我已经将它直接复制到Public_Html文件夹,但这没有解决任何问题。
My reason for needing this HTTPD.CONF
is because, amongst other things, I need to modify many settings, the most important being : MOD_REWRITE
. I need to enable mod_rewrite
, so that I can properly configure the .HTACCESS
file.
我需要这个HTTPD.CONF的原因是因为除其他外,我需要修改许多设置,最重要的是:MOD_REWRITE。我需要启用mod_rewrite,以便我可以正确配置.HTACCESS文件。
I searched online, and found many references to this httpd.conf
, but nothing remotely resembling my situation
我在网上搜索过,发现了很多关于这个httpd.conf的引用,但没有什么能与我的情况类似
I contacted the so-called Customer Support service on my Domain Registrar. They said (and I quote) : if you want to make modifications to your domain configuration, create a file, write the configuration code there, and save the file as : .USER.INI
and then save this file in the Public_Html
folder".
我在域名注册商处联系了所谓的客户支持服务。他们说(我引用):如果你想修改你的域配置,创建一个文件,在那里编写配置代码,并将文件保存为:.USER.INI,然后将该文件保存在Public_Html文件夹中“。
Well, this solution did not sound right to me. But, I did it anyway. I copy-pasted the contents of my own httpd.conf
file into this new .user.ini
file, and saved it to the public_html
folder.
嗯,这个解决方案对我来说听起来不对。但是,无论如何我做到了。我将自己的httpd.conf文件的内容复制粘贴到这个新的.user.ini文件中,并将其保存到public_html文件夹中。
Result: still nothing.
结果:仍然没有。
1 个解决方案
#1
.htaccess
* Maybe the .htaccess
is in the wrong location (determined by httpd.conf
)
* Maybe the .htaccess
has the wrong name (determined by httpd.conf
)
* Maybe the .htaccess
includes directives which are not allowed (determined by httpd.conf
)
* http://httpd.apache.org/docs/current/howto/htaccess.html
.htaccess *也许.htaccess位于错误的位置(由httpd.conf确定)*也许.htaccess名称错误(由httpd.conf确定)*也许.htaccess包含不允许的指令(由httpd确定) .conf)* http://httpd.apache.org/docs/current/howto/htaccess.html
php.ini
* Just as with httpd.conf
there is almost certainly a "global" copy in which case you may only be able to "override" particular settings
* Chopy/paste from another copy elsewhere as a starting point or simply build one with what you need
* http://php.net/manual/en/ini.php
* To find the location of php.ini
and its configuration create a test.php as follows...
php.ini *就像httpd.conf一样,几乎可以肯定是一个“全局”副本,在这种情况下,你可能只能“覆盖”特定的设置*从别处的另一个副本进行Chopy / paste作为起点,或者只是构建一个你需要什么* http://php.net/manual/en/ini.php *要找到php.ini的位置及其配置,请按如下方式创建test.php ...
<?php phpinfo(); ?>
...then point your browser at it.
...然后将浏览器指向它。
httpd.conf
* Your provided has a global copy in place which you almost certainly do not have access to and will have some controls in place to limit user-configured directives in their own .conf - you'll have to contact your provider for specifics
* Try accessing /server-info
and /server-status
(though they are not enabled by default so don't be surprised if you get 404s) - this will give some insight into the configuration
* httpd.conf
should not reside in publicly accessible folders
* http://httpd.apache.org/docs/current/
httpd.conf *你提供的是一个全局副本,你几乎肯定无法访问它,并且会有一些控制来限制用户配置的指令在你自己的.conf中 - 你必须联系你的提供者以获取具体信息*尝试访问/ server-info和/ server-status(虽然默认情况下它们没有启用,所以如果你得到404,也不要感到惊讶) - 这将提供一些有关配置的信息* httpd.conf不应该驻留在公共访问中文件夹* http://httpd.apache.org/docs/current/
You will be best suited by directing your questions to your provider.
通过将您的问题提交给您的提供商,您将是最合适的。
Hopefully this helps.
希望这会有所帮助。
#1
.htaccess
* Maybe the .htaccess
is in the wrong location (determined by httpd.conf
)
* Maybe the .htaccess
has the wrong name (determined by httpd.conf
)
* Maybe the .htaccess
includes directives which are not allowed (determined by httpd.conf
)
* http://httpd.apache.org/docs/current/howto/htaccess.html
.htaccess *也许.htaccess位于错误的位置(由httpd.conf确定)*也许.htaccess名称错误(由httpd.conf确定)*也许.htaccess包含不允许的指令(由httpd确定) .conf)* http://httpd.apache.org/docs/current/howto/htaccess.html
php.ini
* Just as with httpd.conf
there is almost certainly a "global" copy in which case you may only be able to "override" particular settings
* Chopy/paste from another copy elsewhere as a starting point or simply build one with what you need
* http://php.net/manual/en/ini.php
* To find the location of php.ini
and its configuration create a test.php as follows...
php.ini *就像httpd.conf一样,几乎可以肯定是一个“全局”副本,在这种情况下,你可能只能“覆盖”特定的设置*从别处的另一个副本进行Chopy / paste作为起点,或者只是构建一个你需要什么* http://php.net/manual/en/ini.php *要找到php.ini的位置及其配置,请按如下方式创建test.php ...
<?php phpinfo(); ?>
...then point your browser at it.
...然后将浏览器指向它。
httpd.conf
* Your provided has a global copy in place which you almost certainly do not have access to and will have some controls in place to limit user-configured directives in their own .conf - you'll have to contact your provider for specifics
* Try accessing /server-info
and /server-status
(though they are not enabled by default so don't be surprised if you get 404s) - this will give some insight into the configuration
* httpd.conf
should not reside in publicly accessible folders
* http://httpd.apache.org/docs/current/
httpd.conf *你提供的是一个全局副本,你几乎肯定无法访问它,并且会有一些控制来限制用户配置的指令在你自己的.conf中 - 你必须联系你的提供者以获取具体信息*尝试访问/ server-info和/ server-status(虽然默认情况下它们没有启用,所以如果你得到404,也不要感到惊讶) - 这将提供一些有关配置的信息* httpd.conf不应该驻留在公共访问中文件夹* http://httpd.apache.org/docs/current/
You will be best suited by directing your questions to your provider.
通过将您的问题提交给您的提供商,您将是最合适的。
Hopefully this helps.
希望这会有所帮助。