Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
07-19-2017, 11:32 PM
|
#16
|
Member
Registered: Jul 2005
Location: Ithaca, NY
Posts: 82
Original Poster
Rep:
|
Quote:
Originally Posted by JJJCR
try:
whereis httpd.conf
or just browse to /etc then do ls httpd.conf
Didn't know that you have answered to the post already.
Try manually creating the folders as stated on your error: /var/www/html/example.com/public_html
Try setting the permissions to full rights on this path: Cannot access directory '/var/www/html/example.com/logs/'
Of course, when everything is working fine set the appropriate rights.
|
There is no /var/www/html/example.com/logs directory (using my site name) no logs directory
|
|
|
07-19-2017, 11:59 PM
|
#17
|
Senior Member
Registered: Apr 2010
Posts: 2,291
|
Quote:
Originally Posted by signmeuptoo
There is no /var/www/html/example.com/logs directory (using my site name) no logs directory
|
then do:
cd /var
mkdir /var/www
mkdir /var/www/html
mkdir /var/www/html/example.com/
mkdir /var/www/html/example.com/logs
|
|
|
07-20-2017, 12:53 AM
|
#18
|
Senior Member
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,573
|
It was a while ago that I had WordPress going on a home webserver. Can't remember much. But, rather than Apache, I found that lighttpd was easier. Install that and lighttpd-doc, do some reading, and I'm sure eventually you'll get it working.
Of course, if you do get Apache connecting, and the issue is getting WordPress going with it, then ignore my advice. But, if you've not yet had luck with Apache, then I do recommend trying lighttpd instead.
Last edited by mark_alfred; 07-20-2017 at 06:19 PM.
|
|
|
07-20-2017, 04:40 PM
|
#19
|
Member
Registered: Jul 2005
Location: Ithaca, NY
Posts: 82
Original Poster
Rep:
|
Guys, I will try that tutorial and much thanks for the responses. I hope I get some more time to work on this, but I'm going to be gone for a good part of the week tomorrow.
I take it from you all that Apache has been broken too. I don't know if I have to uninstall or wipe anything first, but if I don't hear from you all, I'll just run through that tutorial, it looks pretty much like what I've already done, but maybe it has something critical that will make the difference!
|
|
|
07-20-2017, 05:22 PM
|
#20
|
Member
Registered: Jul 2005
Location: Ithaca, NY
Posts: 82
Original Poster
Rep:
|
Ok, when I try to start that tutorial, I get this in the beginning:
Code:
$ sudo apt-get install apache2
[sudo] password for wutsinterweb:
Reading package lists... Done
Building dependency tree
Reading state information... Done
apache2 is already the newest version (2.4.18-2ubuntu3.3).
0 upgraded, 0 newly installed, 0 to remove and 63 not upgraded.
wutsinterweb@Beast-Wutsinterweb ~ $ sudo su
Beast-Wutsinterweb wutsinterweb # systemctl enable apache2
apache2.service is not a native service, redirecting to systemd-sysv-install
Executing /lib/systemd/systemd-sysv-install enable apache2
Beast-Wutsinterweb wutsinterweb # systemctl start apache2
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
|
|
|
07-20-2017, 05:25 PM
|
#21
|
Member
Registered: Jul 2005
Location: Ithaca, NY
Posts: 82
Original Poster
Rep:
|
Code:
systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Thu 2017-07-20 18:21:42 EDT; 2min 0s ago
Docs: man:systemd-sysv-generator(8)
Process: 27638 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jul 20 18:21:42 Beast-Wutsinterweb apache2[27638]: Output of config test was:
Jul 20 18:21:42 Beast-Wutsinterweb apache2[27638]: AH00112: Warning: DocumentRoot [/var/www/html/example.com/public_html] does not exist
Jul 20 18:21:42 Beast-Wutsinterweb apache2[27638]: (2)No such file or directory: AH02291: Cannot access directory '/var/www/html/example.com/logs/' f
Jul 20 18:21:42 Beast-Wutsinterweb apache2[27638]: AH00014: Configuration check failed
Jul 20 18:21:42 Beast-Wutsinterweb apache2[27638]: Action 'configtest' failed.
Jul 20 18:21:42 Beast-Wutsinterweb apache2[27638]: The Apache error log may have more information.
Jul 20 18:21:42 Beast-Wutsinterweb systemd[1]: apache2.service: Control process exited, code=exited status=1
Jul 20 18:21:42 Beast-Wutsinterweb systemd[1]: Failed to start LSB: Apache2 web server.
Jul 20 18:21:42 Beast-Wutsinterweb systemd[1]: apache2.service: Unit entered failed state.
Jul 20 18:21:42 Beast-Wutsinterweb systemd[1]: apache2.service: Failed with result 'exit-code'.
lines 1-18/18 (END)
Code:
-- The result is failed.
Jul 20 18:21:42 Beast-Wutsinterweb systemd[1]: apache2.service: Unit entered failed state.
Jul 20 18:21:42 Beast-Wutsinterweb systemd[1]: apache2.service: Failed with result 'exit-code'.
lines 1131-1157/1157 (END)
|
|
|
07-20-2017, 06:14 PM
|
#22
|
LQ Guru
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
|
It looks like apache is misconfigured. Try
Code:
$ service apache2 stop
$ dpkg-reconfigure apache2
$ service apache2 start
Don't start apache directly. Use the service command or the init.d script. The docs are available in the apache2-doc package.
|
|
|
07-20-2017, 06:39 PM
|
#23
|
Member
Registered: Jul 2005
Location: Ithaca, NY
Posts: 82
Original Poster
Rep:
|
Code:
service apache2 stop
Beast-Wutsinterweb phpmyadmin # dpkg-reconfigure apache2
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Thu 2017-07-20 19:38:26 EDT; 2ms ago
Docs: man:systemd-sysv-generator(8)
Process: 4749 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jul 20 19:38:26 Beast-Wutsinterweb apache2[4749]: Output of config test was:
Jul 20 19:38:26 Beast-Wutsinterweb apache2[4749]: AH00112: Warning: DocumentRoot [/var/www/html/example.com/public_html] does not exist
Jul 20 19:38:26 Beast-Wutsinterweb apache2[4749]: (2)No such file or directory: AH02291: Cannot access directory '/var/www/html/example.com...conf:35
Jul 20 19:38:26 Beast-Wutsinterweb apache2[4749]: AH00014: Configuration check failed
Jul 20 19:38:26 Beast-Wutsinterweb apache2[4749]: Action 'configtest' failed.
Jul 20 19:38:26 Beast-Wutsinterweb apache2[4749]: The Apache error log may have more information.
Jul 20 19:38:26 Beast-Wutsinterweb systemd[1]: apache2.service: Control process exited, code=exited status=1
Jul 20 19:38:26 Beast-Wutsinterweb systemd[1]: Failed to start LSB: Apache2 web server.
Jul 20 19:38:26 Beast-Wutsinterweb systemd[1]: apache2.service: Unit entered failed state.
Jul 20 19:38:26 Beast-Wutsinterweb systemd[1]: apache2.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
|
|
|
07-20-2017, 10:01 PM
|
#24
|
LQ Veteran
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: Rocky 9.6
Posts: 5,906
|
Quote:
DocumentRoot [/var/www/html/example.com/public_html] does not exist
|
Definitely a problem. httpd.conf might be at /etc/httpd/conf/httpd.conf , but wherever it is is, DocumentRoot is not set correctly. Having "example.com" in the path is very strange.
Out of the box, I'd expect it to be set to /var/www/html
use
Code:
find / -name httpd.conf -ls
to figure out where it is, then set DocumentRoot to a valid directory path. Read the internal comments in the config file for guidance. They're very clear.
|
|
|
07-20-2017, 10:36 PM
|
#25
|
Member
Registered: Jul 2005
Location: Ithaca, NY
Posts: 82
Original Poster
Rep:
|
That command needs something different in it? it hangs at /lost+found.
|
|
|
07-20-2017, 10:53 PM
|
#26
|
Member
Registered: Jul 2005
Location: Ithaca, NY
Posts: 82
Original Poster
Rep:
|
what about this?
Code:
locate httpd.conf
/etc/phpmyadmin/lighttpd.conf
That confuses me, I looked at that file but don't know what to do with it.
|
|
|
07-20-2017, 11:00 PM
|
#27
|
Member
Registered: Jul 2005
Location: Ithaca, NY
Posts: 82
Original Poster
Rep:
|
contents of lighttpd.conf:
Code:
# Alias for phpMyAdmin directory
alias.url += (
"/phpmyadmin" => "/usr/share/phpmyadmin",
)
# Disallow access to libraries
$HTTP["url"] =~ "^/phpmyadmin/templates" {
url.access-deny = ( "" )
}
$HTTP["url"] =~ "^/phpmyadmin/libraries" {
url.access-deny = ( "" )
}
$HTTP["url"] =~ "^/phpmyadmin/setup/lib" {
url.access-deny = ( "" )
}
# Limit access to setup script
$HTTP["url"] =~ "^/phpmyadmin/setup" {
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/etc/phpmyadmin/htpasswd.setup"
auth.require = (
"/" => (
"method" => "basic",
"realm" => "phpMyAdmin Setup",
"require" => "valid-user"
)
)
}
|
|
|
07-20-2017, 11:03 PM
|
#28
|
Member
Registered: Jul 2005
Location: Ithaca, NY
Posts: 82
Original Poster
Rep:
|
contents of /usr/share/phpmyadmin:
Code:
/usr/share/phpmyadmin $ ls
browse_foreigners.php doc prefs_manage.php server_variables.php tbl_select.php
changelog.php error_report.php print.css setup tbl_sql.php
chk_rel.php export.php schema_export.php show_config_errors.php tbl_structure.php
config.sample.inc.php favicon.ico server_binlog.php sql tbl_tracking.php
db_central_columns.php file_echo.php server_collations.php sql.php tbl_triggers.php
db_datadict.php gis_data_editor.php server_databases.php tbl_addfield.php tbl_zoom_select.php
db_designer.php import.php server_engines.php tbl_change.php templates
db_events.php import_status.php server_export.php tbl_chart.php themes
db_export.php index.php server_import.php tbl_create.php themes.php
db_import.php js server_plugins.php tbl_export.php transformation_overview.php
db_operations.php libraries server_privileges.php tbl_find_replace.php transformation_wrapper.php
db_qbe.php license.php server_replication.php tbl_get_field.php url.php
db_routines.php lint.php server_sql.php tbl_gis_visualization.php user_password.php
db_search.php locale server_status_advisor.php tbl_import.php version_check.php
db_sql_autocomplete.php logout.php server_status_monitor.php tbl_indexes.php view_create.php
db_sql_format.php navigation.php server_status.php tbl_operations.php view_operations.php
db_sql.php normalization.php server_status_processes.php tbl_recent_favorite.php
db_structure.php phpinfo.php server_status_queries.php tbl_relation.php
db_tracking.php phpmyadmin.css.php server_status_variables.php tbl_replace.php
db_triggers.php prefs_forms.php server_user_groups.php tbl_row_action.php
|
|
|
07-20-2017, 11:16 PM
|
#29
|
Member
Registered: Jul 2005
Location: Ithaca, NY
Posts: 82
Original Poster
Rep:
|
Does this tell you anything, I saw something about envvars, I have no idea what they are talking about :
Code:
/etc/apache2 $ ls
apache2.conf conf-available conf-enabled envvars magic mods-available mods-enabled ports.conf sites-available sites-enabled
wutsinterweb@Beast-Wutsinterweb /etc/apache2 $ cd conf-available
wutsinterweb@Beast-Wutsinterweb /etc/apache2/conf-available $ ls
charset.conf localized-error-pages.conf php7.0-fpm.conf security.conf
libjs-twitter-bootstrap.conf other-vhosts-access-log.conf phpmyadmin.conf serve-cgi-bin.conf
wutsinterweb@Beast-Wutsinterweb /etc/apache2/conf-available $
|
|
|
07-21-2017, 12:03 AM
|
#30
|
Senior Member
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 22 MATE, Peppermint OS-Devuan, EndeavourOS, antiX
Posts: 4,552
|
signmeuptoo,
If I were you I would take a deep breath and start again from scratch rather than trying to fix a clearly broken installation.
Good luck.
|
|
|
All times are GMT -5. The time now is 03:52 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|