I am trying to find a way for php to create a vhost config for apache so a user can enter there domain in and I can direct it to a given folder. Is this even possible to do with php? Or would I be better off using .htaccess and mod_rewrite. I looked all over and I can't find a clear answer to this problem. Basicly, I need php to write something to apache that points a domain to a given folder.
关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率
用php创建apache vhost
收起
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 微信扫一扫点击复制链接分享
- 邀请回答
- 编辑 收藏 删除 结题
- 收藏 举报
追加酬金 (90%的用户在追加酬金后获得了解决方案)
当前问题酬金
¥ 0 (可追加 ¥500)
支付方式
扫码支付
加载中...
0条回答 默认 最新
报告相同问题?
提交
- 2014-04-17 03:11回答 1 已采纳 You can create a separate <Directory> configuration (outside of the <VirtualHost> bloc
- 2018-08-20 15:48回答 3 已采纳 From everything I read here, including your comments it seems your "production" server is behind a
- 2014-12-03 10:26回答 1 已采纳 The solution was to add RewriteBase to .htaccess. RewriteEngine on RewriteBase / RewriteRule ^xxx
- 2023-05-29 07:07本项目服务端环境要求为 Windows + Apache + PHP + MySQL。 下面介绍如何搭建环境,部署服务器端应用。 1.开发工具WAMP Server安装包 ...6.左键单击WAMP Server图标,选择【Apache】 → 【httpd-vhost.conf】:
- 2012-03-02 15:05回答 2 已采纳 This is slightly tricky to handle with Plesk as the control panel likes to be in control of the Ap
- 2014-08-25 15:40回答 1 已采纳 Your problem is probably that libapache2-mod-php5 is not installed. This is the program that links
- 2012-09-17 21:27回答 4 已采纳 After many times, I founded the solution ! The problem was in my username.conf (/etc/apache2/users
- 2015-08-28 12:23Myng的博客 本文地址: 作者:oneym一、环境描述1、使用php环境使用XAMPP 2、win7_64位系统 3、XAMPP安装在C盘根目录二、修改相关文件1、在系统中注册主机头使用文本编辑...127.0.0.1 oneym.dev2、启用Apache的vhost功能定位到C
- 2014-03-29 19:43回答 1 已采纳 If you are putting that in your Apache config file directly, RewriteBase only works inside <dir
- 2018-09-30 15:02回答 2 已采纳 Managed to solve my issue with the following settings: launch.json { "version": "0.2.0",
- 2019-05-11 19:53回答 1 已采纳 The issue is you have spaces in your .env file. Try changing it to: PHP_DATE_TIMEZONE=Europe/Lon
- 2021-05-23 13:49使用命令行创建Apache虚拟主机(VHost)PHP脚本。 用法: sudo path_to / addhost.php IP域PATH_TO_PROJECT_FOLDER [--htaccess] [--composer] [--errorlog] 或者 sudo path_to / addhost.php IP域名--removehost ...
- 2015-05-26 21:34回答 4 已采纳 The solution was that while php was enabled, for some reason the default setting in httpd.conf was
- 2021-10-16 19:23jackyvan的博客 nginx+apache 新增vhost并新增端口 生产环境为 nginx + apache nginx 1. 提供静态主页的WEB服务 2. 通过反向代理访问apache里的服务 lampp的apache 提供后端服务功能 现在要在尽量不改动后端的基础上,临时性的把...
- 2019-06-19 17:38经常使用Apache虚拟主机进行开发和测试,但每次需要配置虚拟主机时都习惯性的ctrl+c和ctrl+v,这次由于重装系统,需要配置一个新的PHP开发环境虚拟主机,于是总结一下Apaceh配置httpd-vhosts虚拟主机使用方法和步骤...
- 2023-10-04 06:43ZoExamples的博客 为了实现多个网站的同时运行,您可以配置虚拟主机(VHost)。本文将向您介绍如何在 Mac 系统上进行 Apache 虚拟主机设置,并确保 PHP 能够正常运行。通过配置不同的虚拟主机,您可以同时运行多个 PHP 网站。现在,您...
- 2021-05-20 07:31从Symfony2 parameters.yml生成apache vhost和bash导出 安装 $ wget https://github.com/fnash/configen/releases/download/1.0/configen.phar 用 #vhost_template.txt {{symfony_vars}} $ php configen.pĥar...
- 2022-07-23 09:15slongzhang_的博客 在安装和查看错误时需要命令启动,其他的也可图形界面操作,在安装目录bin下的ApacheMonitor.exe。安装php7.*版本可能会出现curl开启失败可参考。
- 2020-10-30 10:01卡尔特斯的博客 Apache 安装后,有一个默认站点,其配置都在 Apache 的主配置文件(httpd.conf)中,主要包括如下几项。 1、站点域名: ServerName # # ServerName gives the name and port that the server uses to identify ...
- 2022-08-08 18:33修改Apache的配置文件:编辑配置文件,搜索httpd-vhost,去掉#号,然后保存配置文件: [root@gary-tao
- 没有解决我的问题, 去提问
悬赏问题
- ¥15 无线电能传输系统MATLAB仿真问题
- ¥50 如何用脚本实现输入法的热键设置
- ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
- ¥30 深度学习,前后端连接
- ¥15 孟德尔随机化结果不一致
- ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
- ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
- ¥15 谁有desed数据集呀
- ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
- ¥15 关于#hadoop#的问题