最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【基本解决】在哪里才能找到HostMonster中的Linux的Apache服务器中的httpd.conf -> 修改.htaccess可实现同样的效果

WordPress crifan 2450浏览 0评论

【问题】

在折腾:

【已解决】实现基于HostMonster中的Apache的Wordpress的在线网站crifan.com的文件列表显示

过程中,由于ww.crifan.com是基于Linux+Apache的,所以需要去修改对应的httpd.conf文件。

所以现在想要知道,此httpd.conf文件在HostMonster的Linux的哪个位置。

 

【解决过程】

1.网上找了下,这人:

请问谁知道HM的这个在哪里呀,httpd.conf

也遇到类似问题,但是无解。

2.之前也有人去HM问此问题:

Writing .htaccess

httpd.conf Help

httpd.conf

I have no httpd.conf or php.ini file

但是无解。

3.很多人:

請問誰知道HM的這個在哪裡呀,httpd.conf – HostMonster

提到了.htaccess,但是我这里,好像也没看到对应的文件在哪。

4.HM官网的某个问题回答:

Hostmonster Web Hosting Help – Redirects that do not work due to PHP variables

和常见问题解释:

Hostmonster Web Hosting Help – SSH Commands

提到了httpd.conf,好像是通过SSL可以访问到。

具体如何操作,暂时不清楚。

(注:后来在:

http://www.antihostmonster.com/category/ssh-commands/

也看到了和上面类似的相关命令的使用方法)

 

5.所以接着就是去尝试开启HostMonster里面的SSL。

找到了官网的解释:

Hostmonster Web Hosting Help – SSH Access

安装其解释,一步步去操作。

6.进入CPanel后,点击“SSH/壳访问”:

ssh shell

然后再点击“Manage SSH Access”:

click Manage SSH Access

 

出现“SSH Access Settings”

ssh access settings

设置为“SSH Access Enable”:

enable ssh

再点击Submit。

果然出现了教程中说的错误提示:

“ERROR: You account must be verified before shell access can be enabled. Please contact our Verification Department to verify your account before continuing.”

error you account must be verified

7.所以,只能参考教程:

Hostmonster Web Hosting Help – Validating Your Account Purchase

去验证。

但是看了解释,对于其中的“PayPal holder’s government-issued photo identification card”的含义,不太懂指的是啥。

不过后来找到有人对此流程的解释:

bluehost SSH 申请开通流程(更改后的认证机制)

倒是基本搞懂了,估计就是身份证。

另外也在:

关于购买JustHost主机后的身份验证方法

中看到了具体解释:

the PayPal account owner’s government-issued photo identification card (such as a driver’s license, passport, or resident ID card).

所以应该就是前面那人说的:

(1)身份证

(2)last four characters of the hosting password /seven digit PayPal invoice ID number

 

等有空再去申请。

8.突然发现,原来我的当前的wordpress根目录下面,就已经存在了.htaccess文件的:

cpanel found .htaccess

后续的折腾,证明了.htaccess文件中,可以添加相应的配置,基本上可以实现了之前通过修改httpd.conf而达到的效果了。

9.后续对于.htaccess的配置,参考:

【已解决】实现基于HostMonster中的Apache的Wordpress的在线网站crifan.com的文件列表显示

 

【总结】

HostMonster中不允许直接访问httpd.conf。

需要通过SSL才能访问。但是开启SSL很麻烦,需要验证。

一般的在httpd.conf中的配置,可以直接写到.htaccess,实现同样的效果。

注:而.htaccess和php.ini,一般都在网站(wordpress)根目录下。

如果没有这两个文件,则可以去CPanel->软件->Php Config->PHP 5.2 (Single php.ini)或PHP 5.3 (Single php.ini)->SAVE CHANGES->即可生成对应的php.ini。

转载请注明:在路上 » 【基本解决】在哪里才能找到HostMonster中的Linux的Apache服务器中的httpd.conf -> 修改.htaccess可实现同样的效果

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
83 queries in 0.161 seconds, using 22.11MB memory