Can't change localhost directory

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
Dzoni
Level 1
Level 1
Posts: 2
Joined: Thu Oct 17, 2013 12:42 pm

Can't change localhost directory

Post by Dzoni » Thu Oct 17, 2013 12:54 pm

Hello everyone and first of all - sorry for my bad english! :? I'm tried to find the solution on the Google, but there isn't a problem such as this.

Well, i'm set up the directory to /home/nikola/www at file default and default-ssl in the folder sites-available:

:arrow: default

Code: Select all

DocumentRoot /home/nikola/www
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /home/nikola/www>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>
:arrow: default-ssl

Code: Select all

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
	ServerAdmin webmaster@localhost

	DocumentRoot /home/nikola/www
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /home/nikola/www>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined


etc.

And in folder sites-enabled, at file 000-default:

Code: Select all

DocumentRoot /home/nikola/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/nikola/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
But whem i type localhost it give me the content from /var/www/index.html :( Where is the problem? Thanks in advance!

Dzoni
Level 1
Level 1
Posts: 2
Joined: Thu Oct 17, 2013 12:42 pm

Re: Can't change localhost directory

Post by Dzoni » Thu Oct 17, 2013 12:57 pm

I found a solution! Just opened folder as root user (WWW) and removed index.html! :)

Post Reply

Return to “Software & Applications”