M
M
Maxim Shadrin2014-09-18 15:57:30
Apache HTTP Server
Maxim Shadrin, 2014-09-18 15:57:30

How to configure apache?

Hello. The point is this. Apache is deployed on the server (windows server). When I go from the browser to the ip of the server, I get to the site that lies on this server in a certain directory. I need to put another site there and access it from the browser like this: ip address/my_site
I tried to create a directory in the folder with the site and upload files there, but I come across access denied.
Help me configure apache
Here is the config itself

ServerRoot "C:\Program Files (x86)\TrueConf Server/httpconf"

Include conf/listen.conf

LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule sspi_auth_module modules/mod_auth_sspi.so

Include opt/*.conf

  ServerSignature Off
  ServerTokens    Prod
  ServerAdmin     [email protected]
  PidFile         "weblog/tc_webmgr.pid"
  ErrorLog        "weblog/error.log"
  DefaultType     text/plain
  LogLevel        warn

NameVirtualHost *:*
<VirtualHost *:*>
  DocumentRoot "C:\Program Files (x86)\TrueConf Server/httpconf/site"
  ServerName   localhost
</VirtualHost>

<IfModule !mpm_netware_module>
  <IfModule !mpm_winnt_module>
    User daemon
    Group daemon
  </IfModule>
</IfModule>

<IfModule mime_module>
  TypesConfig conf/mime.types
  AddType application/x-compress .Z
  AddType application/x-gzip .gz .tgz
</IfModule>

<IfModule ssl_module>
  SSLRandomSeed startup builtin
  SSLRandomSeed connect builtin
</IfModule>

AddType application/x-httpd-php php
PHPIniDir "C:\Program Files (x86)\TrueConf Server\php"
LoadModule php5_module "C:\Program Files (x86)\TrueConf Server\php\php5apache2_2.dll"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
oia, 2014-09-18
@oia

Setting up virtualhost in apache tohait.ru/tuning/apache/96

M
Maxim Shadrin, 2014-09-19
@makc9I

replaced the entry

NameVirtualHost *:*
<VirtualHost *:*>
  DocumentRoot "C:\Program Files (x86)\TrueConf Server/httpconf/site"
  ServerName   localhost
</VirtualHost>

on the
#NameVirtualHost *:*
<VirtualHost 10.178.40.68:80>
  DocumentRoot "C:\Program Files (x86)\TrueConf Server/httpconf/site"
  ServerName   localhost
</VirtualHost>
<VirtualHost 10.178.40.68:333>
  DocumentRoot "C:\Program Files (x86)\TrueConf Server/httpconf/docs"
  ServerName   localhost
</VirtualHost>

also found the listen.conf file
where the entry was
expanded to
Listen 80
Listen 333

placed the site in the docs directory along the path C:\Program Files (x86)\TrueConf Server/httpconf/docs
All I could achieve was 404 errors when accessed from the browser at 10.178.40.68:333
I realized that the point was that you still need to configure Apache to look for index.php and run it by default. Without thinking for a long time, I copied .htaccess from the working directory with the site to mine
. The miracle did not happen. Still the same error 404
The file itself looks like this:
ErrorDocument 403 /guest/error/403

RewriteEngine on

AddType text/x-component .htc

RewriteRule ^api/?([^/]*)?/?$ api/common.php?method=$1 [L,QSA]
RewriteRule ^api/ab/([^/]+)/?$ api/common.php?method=ab&login=$1 [L,QSA]
RewriteRule ^client/([^/]+)/([^/]+)/?$ api/extra/client.php?method=$1&version=$2 [L,QSA]

RewriteRule ^$ public/index.php

RewriteRule ^public/js/(en|ru|cs|de|es|fr|nl|pl|pt).js$     public/js/locale.php?lang=$1 [L,QSA]

RewriteRule ^c/(.*)$    public/index.php?area=guest&module=conference&key=$1 [QSA]
RewriteRule ^guest/?([^/]*)?(/([^/]*))?/?$ public/index.php?area=guest&module=$1&action=$3 [L,QSA]

RewriteRule ^downloads/trueconf_client\.exe /handlers/widget.php?widget=win-installer&method=download [QSA]
RewriteRule ^downloads/(.*)/guest_trueconf_client\.exe /handlers/widget.php?widget=win-installer&method=guest_download&key=$1 [QSA]
RewriteRule ^downloads/trueconf_client\.dmg - [L,QSA]

#RewriteRule ^(admin/conferences/play/)(.+)$  /$1?filename=$2 [QSA]

RewriteRule ^slideshow/([^/]+)/([^/]+)/? /application/handlers/get-img-file.php?conf_id=$1&file_name=$2 [L,QSA]

RewriteRule ^handlers/widget\.php\??(.*)$    /application/handlers/widget.php?locale=$1&$2 [L,QSA]

RewriteRule ^handlers/(.+)\.php\??(.*)$    /application/handlers/$1.php?locale=$2&$3 [L,QSA]

RewriteRule  images/(.+)\.(gif|png|jpg|jpeg|ico) public/images/$1.$2 [L,QSA]

RewriteRule  \.(php|js|pdf|txt|htc|css|xml)     -  [L,QSA]

RewriteRule  ^([^/]*)?/?([^/]*)?(/([^/]*))?/?$ private/index.php?area=$1&module=$2&action=$4 [L,QSA]

Although, as I understand it, the line is enough for meRewriteRule ^$ public/index.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question